Enhance the bulk deletion function performing the deletion in topological order, deleting children then parents.