Fix pkgin search (yielding wrong results under certain conditions, see inline comments).
Merge pull request #3655 from disko/pkgin_search_fix

Fix pkgin search