Nodes should be rejected based on the existence of an edge, not based on whether that edge has already been visited or not.