ensure_packages checks for already defined