bug #22: function-begins-with-a-loop crash from bad assumptions