this startpos defined on this line is about searching the *same* word again later in the text, not about searching the next word.