have_key always fails if the subject is not a dict