Fix `_get_column_pos_of_word` so that the `SEARCH_WHOLE_WORDS` flag will properly find words that are at the end of a line. Fixes #7326 . (cherry picked from commit d1cf29fe99)
d1cf29fe99