More autocomplete logic changes.

Only cut off end of word if the word we are inside is the last value completed.

“L[]exi” will strip the “exi” if the last completed value was “Lexi”
It would become “L[ama] exi” if the last completed value was not “Lexi”

The nick completion suffix does not make a difference in this logic.