Fix package_name, target_ref lookups.