[issue547] fix failing test: py3 doesnt like dictionary-changed-sized-during-iteration