Fix cycle detection (bad path reference)
Merge pull request #6 from brandur/brandur-fix-cycle-detection

Fix cycle detection (bad path reference)