Fix bad package_ensure logic