(compare_word_to_right): use correct upper boundary of scanned text.