[642] Make sure package_search only checks inventory when called for_view