The crash was caused by using `modify_geometry_sets` to modify instances, which does not generally work unfortunately. The intended behavior was wrong anyway. In instances mode, only top level instances should be deleted. Also removed the old error handling because it doesn't look like it ever worked. all_is_error remained false all the time. Furthermore, updating it was not thread safe. Differential Revision: https://developer.blender.org/D13736