Fix loop detection by including associated schema
Clean up implementation by using aggregate key
Merge pull request #10 from brandur/brandur-fix-loop-detection

Fix loop detection by including associated schema