Fix bug #6687 with cursor positioning after before-string from overlays.