Thread:Semantic-mediawiki.org:Community portal/Wrapping a compound query around a loop./reply

I should mention that I've tried the usual suspects of escaping a loop. The compound queries work fine too, unless I combine it with a loop.