Fixing iterator after its invalidated by erase operation.
Thread safety comes first. Must protect the iterator integrity.