prevent infinite loop in pathfinder reports

http://manage.dimagi.com/default.asp?122860