update coalesceMatches to more intelligently handle partial name collisions