Fix bug in package search

If a string was an exact match, but also matched as a substring of another
package, only the exact match was shown. This change always searches for
substrings, and only jumps to an exact match if no other matches are found.