Loop detection
We need a loop detection..
Configurations are directed graphs. Therefore, a loop is a strongly connected component. Tarjan's algorithm does not suite our needs, as it will not detect nested strongly connected components (nested loops would be ignored)