Fix a ConcurrentModificationException.