Correctly split the words when adding to the search index (see #5363)