allow early return from function-loops

Merged username-removed-383729 requested to merge gl-103 into master