While generally that may be the case (I don't really care much for arbitrary and capricious rules like this, that have no foundation in health or safety), do keep in mind that others wearing hats indoors may have reasons for which there is no good reason to challenge them. One of our church's recurring musicians wears a hat indoors all the time now, ever since her successful kidney transplant surgery. I don't know her very well, nor do I know the specifics, but there is no reason not to assume that she's wearing a hat indoors now for some important reason, perhaps related to her recent medical concerns.