It has become fashionable to give a psychiatric diagnosis to those Republicans teeing up a government shutdown.

"They're on a different planet," Sen. Chuck Schumer of New York, a member of the Senate Democratic leadership, said last week. "Off the deep end."

Majority Leader Harry Reid said Republicans "define insanity" with their behavior.

I've lapsed into the off-the-rocker shorthand, too, but this misstates -- and understates -- the problem. The trouble isn't that Republicans on the defund-Obamacare mission are insane. It's that they are being entirely rational.

Certainly, what they are doing is dangerous to the country and to the GOP brand: A minority within the government is saying that if their demands are not met, they will throw the nation into default and shock the economy by closing down the government.

But this doesn't mean that the 228 House Republicans (joined by two Democrats) were acting irrationally when they voted Friday to keep the government operating only if Obamacare is jettisoned. Most of them were acting in their own rational self-interest, doing what's necessary to survive in a political system gone mad.

The tally by political handicapper Stuart Rothenberg says that 211 of the 234 Republican seats in the House are "safe," leaving only 23 even marginally competitive. Some of those seats are made safe by the incumbents' skills or bank accounts. But many of the seats are safe because district lines have been drawn to make them uncompetitive.

The only way these Republican lawmakers would lose their seats is if they were ousted by a challenger in a low-turnout primary dominated by conservative activists. The surest way to keep their seats, therefore, is to vote against anything and everything President Obama supports -- Obamacare above all.

The situation is similar for Republicans in the Senate, where 14 of the 15 GOP seats up in the next election cycle are either safely Republican or favoring the Republicans. To them, as well, the threat comes primarily if not entirely from the right.

Sen. Ted Cruz of Texas, the man leading the shutdown campaign, knows this better than anybody. Sen. John McCain (R-Ariz.) called him a "wacko bird," but Cruz is, in fact, coldly calculating.

A new article about Cruz by Jason Zengerle in GQ confirms my impression of him as an opportunist driven more by ambition than ideology.

A Harvard Law School roommate of Cruz's told Zengerle that Cruz refused to study with anyone who hadn't been an undergraduate at Harvard, Princeton or Yale. But when the tea party became a political force and Cruz saw a route to power, he shed his elitism and posed as a rebellious outsider. His rise, and his ability to make even the grizzled Senate Republican leader Mitch McConnell cower, is the result of a cunning -- and thoroughly rational -- exploitation of the system. The only wacko bird in Cruz's office is on the Daffy Duck baseball cap that he keeps as an answer to McCain.

And McConnell, who is facing a conservative primary challenge in Kentucky, is also acting rationally in trying to keep up with the Cruzes. McConnell has been a proud internationalist and hawk throughout his career, but after Cruz and fellow wacko-bird Sen. Rand Paul (R-Ky.) opposed military action in Syria and McConnell's primary opponent took the same position, poor McConnell broke with other Republican leaders and declared that he, too, opposed military action.

If McConnell and the other frightened Republicans are to be faulted, it's for putting their own political survival above all else and doing things they know are dumb.

One of the most honest assessments of the Republican position came from Rep. Thomas Massie of Kentucky, who explained last week why he favored the shutdown showdown: "All that really matters is what my district wants. And my district is overwhelmingly in favor of my position."

An enlightened officeholder might decide that other things matter, too: his oath to the Constitution, the national interest, and his obligation to lead people and not just reflexively to follow public opinion. His constituents may not be aware of the hit the economy takes from a government shutdown and a default -- but Massie should.

Massie's position is shortsighted -- but it is rational. Until Republicans can fix their truly insane primary system, it may be the only logical response.