It seems that the mptt engine in conjunction with a tight loop deleting items fails to correctly update mptt pointers. Thus just disable the mptt magic while deleting and then rebuild the tree afterwards.

This is a rather heavy handed fix for the problem, revisit later.
Should fix #514.