Make matchedEndLine bail when it hits a line that moved to a new region. Refactor the float checks too so that they include the pagination delta in the distance checked, and so that the code isn't duplicated twice.
Created attachment 108406 [details] Patch
Fixed in r95756.