Use in rather than has_key for lookup.