Updated to make use of "FIRSTCHARS" search in getMatchingIndex.