I USED to be a child molester.

Not in actuality. In the popular imagination. In public debate.

That’s how gay men were once portrayed — not just as sexual deviants but as sexual prowlers, sexual predators, their eyes lecherously trained on the young, the vulnerable, the recruitable.

Hatemongers spread this slander to argue that we mustn’t be teachers, shouldn’t be coaches, couldn’t be trusted. Their words were so common and feebly challenged in the 1960s and 1970s, when I grew up, that even in the 1980s, when I was in my 20s, I sometimes kept an extra few feet between me and boys. I refrained from the typical sort of ebullience and friendliness that an adult summons when introduced to an acquaintance’s kid for the first time.

I didn’t want to arouse suspicion.

I flashed back on that when residents of Houston voted last week against an anti-discrimination law that did all sorts of unimpeachable things because it supposedly did one thing that scared the bejesus out of them: enabled men in dresses to sneak into women’s restrooms.

This specter was invented by opponents of the law, who were fixated on just a part of it: its inclusion of transgender people among blacks, gays and other classes protected from being fired or denied access to public accommodations because of their very identities.