Refine reverse selection workaround.

The workaround should only be triggered when the start character of the
selection is the last character on a line. Starting from the middle of a
line shouldn't do anything.

Additional work on #440.
Remove duplicate instanceof check.

It is already checked at the start of the function.