Don't use has_key() on dicts, use `in'.