[ut] distinct_nodes_with_the_same_key_visited

Make sure nested::for_each visits all the nodes with given key.