Fix some more edge cases related to zero-length matches at the end of lines.
Fix some more edge cases related to zero-length matches at the end of lines.

lekkas/livegrep,lekkas/livegrep,paulproteus/livegrep,wfxiang08/livegrep,paulproteus/livegrep,lekkas/livegrep,wfxiang08/livegrep,wfxiang08/livegrep,wfxiang08/livegrep,lekkas/livegrep,lekkas/livegrep,lekkas/livegrep,wfxiang08/livegrep,paulproteus/livegrep,paulproteus/livegrep,paulproteus/livegrep,paulproteus/livegrep,wfxiang08/livegrep