The valid word detection did not account for the fact that a valid word
could exist twice in the list: once at a non-multiple-of-five index
because it is the end of one word and the start of another, and again at
a multiple-of-five index for the word itself. An example is aglow agony
contains wagon. This prevented wagon from being considered a valid word
(even though it could be selected as the target word).
This fix loops through all detections of the word in the dictionary to
see if any are at a multiple-of-five index.