Fix crash when selecting text, overwriting it with a character, and then moving the caret