Fixed time-to-time segfaults when deletting a group of elements from scene

The reason is still unknown and seems pretty strange!