Filled the parameter cache with default values tagged with package_id 0 rather than NULL to fit with the apm_package_id_from_key's default value for package_id when there's no instance available (can't really use null because "package_id = NULL" is always false in SQL).
change apm_package_url_from_id to return the first url (after finding half a dozen essentially identical queries to do that in package specific routines I think its clear it makes more sense to do that