Slightly improve search result ordering.

Shorter matching names are now preferred before sorting alphabetically.