Good point, I usually double check what my slaves wear before selling them, but something is doomed to be missed.
In order to recover our items, I think we can just insert some lines at the beginning of removefrommansion() in globals.gd.
This doesn't prevent players to cheat though, because the function is called after they have sold their slaves.