Don’t iterate to an invalidated iterator after erasing.