add a cycle detection algorithm and add tests from output results from current through2 as found in module-deps