Fix memory corruption crasher when removing iterators and then incrementing them incorrectly