Remove use of deprecated has_key.