Fix an off-by-one bug in computing the index of the word to clear.