After a few hours of head scratching I gave up on using the standard repeater loop and instead used a foreach loop. Worked fine, even with the break in an if statement as shown here.
I am also having issues with this. It is limiting the number of results, but causing the page to endlessly load. I have used this in the past with no issues.