Detect backwards edges that are causing a cycle
Detect backwards edges that are causing a cycle