Fix: ensure_packages() that requires an array