I just came across the same problem, but I have a unique index of a bunch of fields thats causing the error. It makes sense to process deletes first.