simplify get-instance-name when word-index is string

Doesn't need all that code when word-index is a string.