check predicate every time when navigating lines. fixes infinite loop bug when a closing statement has no paired opening statement.