Add HasCycle for finding whether a list of Nodes have a cycle in them.