unused variable stale_keys_vars_domain_ids, probably not needed