Pkg2: more efficient version of Pkg2.installed(pkg)