Sort the TrashObjects before removal to prevent foreign key errors
Use consistent lock style