This could use some test that ensures that added keys during iteration are visited too.