Federal judges are now telling universities what restrooms their students must use. This in a country which deposed its anointed king in the name of liberty. So much for the limited government of which its founders dreamed.

Don't think I'm making light of the problems faced by people whose sexual identification doesn't match their biology. The rates of depression and suicide among transgendered people are horrific. My point has to do with the tendency of governments to blunder about, making things worse.

Suppose you were an employer, and one of your members of staff no longer identified with his or her birth gender. My guess is that you'd find a way of working out which toilet your employee could use in a way that everyone in the office could live with.

Human beings are social creatures, and we're good at finding such compromises. Every time we say "it's her turn next" or "I was sitting there" or "you gave your word," we are appealing to social codes that have nothing to do with legislation. It's how most human relations work.

But suppose that you were ordered by federal law to change policy. Immediately, your attitude would be different. You'd resist being told what to do with your own business.

Your transgendered employee would suddenly become a potential antagonist rather than a staff member to whom you owed a duty of care. Other employees might become resentful. The mood would quickly become one of confrontation rather than compromise.

Which makes me wonder at the motives of those who want to treat every toilet as a political battleground. Do they truly imagine that fair-mindedness can be legislated for? Are they, indeed, primarily interested in the welfare of the people in whose name they claim to be acting?

The British writer James Bartholomew recently coined the phrase "virtue signaling" to refer to the way in which people adopt policy positions primarily as a way of letting everyone see how nice they are. His phrase quickly passed into common currency, because everyone recognized the phenomenon.

When someone says "multinational corporations are evil" or "Republicans are racists," they're not primarily making a statement about politics. What they're saying is: "Look at me! See how well-intentioned I am!"

Paradoxically, the most common form of virtue signaling is to advertise that you hate the right things and the right people. It never occurs to virtue signalers that boasting of their hatred undermines their claim to decency.

They will declare, without irony or self-awareness, "Don't tolerate intolerance," or "I won't read that newspaper, it's too bigoted," or "I hate that man, he's so prejudiced."

Our age, more than any other, elevates the moralistic (voicing the correct views) over the moral (doing the right thing). You can fiddle your taxes, cheat on your spouse, lie to your friends — nothing provokes as much opprobrium as, for example, holding the wrong opinions about immigration.

Virtue signaling is competitive. To remain visibly nice, you have to find more and more recherche causes. It won't do to argue that gay people should be treated equally, or that racial discrimination is wrong, because hardly anyone will take issue with you.

You need to find something more trend-setting. The championing of transgendered rights, a cause most of us had barely heard of five years ago, is a suitably niche way to flaunt your piety.

Peter Tatchell, a genuinely brave British-Australian gay rights activist who took on African dictators and radical imams rather than just Anglican bishops, was recently anathematized by the equalities officer of the National Union of Students because he had expressed the wrong opinions about the rights of transgendered people.

It wasn't even that he had been dismissive of their claims; rather, it was that he had offered the opinion that people with dissenting views ought to be heard.

That was, if you like, the ultimate form of conspicuous consumption: condemning a man who had done as much as anyone for the rights of gay people because his views on free speech were not politically correct.

That young equalities officer was in the inner sanctum of virtue signaling, the Holy of Holies that may be entered only once a year by the high priest, and that only after due purification.

Still, there is, or ought to be, a difference between a dim-witted student and the government of the United States of America. When the student is ostentatiously self-righteous, that's her problem. When the government of a mighty nation acts the same way, it's everyone's problem.

Dan Hannan is a British Conservative MEP.