fix termination cache bug

with each character a word (often in this project referred to as "no spaces" which is misleading), a db search to see if any multi-word terms contained a character with subsequent characters would return terms that had that character in a final position as well