FIX: Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code. Closes #1083
c528c79