Terminate early when no terms left in the suggest string.

Closes #2817