Add a test for an infinite loop bug in SiteTree

At the moment I'm just using this for running Travis tests. Will update once bug is confirmed etc.