OC-8512 Exception when typing on empty line at non-zero column during indexing
(cherry picked from commit f40dfd1)