Fix crash in particle server

fixes issue #1647

was using const_iterator and then changing the map... stupid!