Fix adding attribute keys and categories in packages.