RALEIGH – Sometimes you win. Sometimes you lose.

And sometimes a loss still gives you a win.

The North Carolina General Assembly is back in town. Lawmakers will tackle two tasks this week. One is to approve new legislative and congressional maps for the 2012 elections and beyond. The Republicans have the votes and will pass their redistricting plans, flawed as they are.

The other task will be the legislature’s attempt to override some of Gov. Beverly Perdue’s 2011 vetoes. With their veto-proof majority in the state senate, Republicans have already overruled the governor’s objections on several key bills. The real action is in the state house, where an override requires a bipartisan vote.

Let’s contrast the fates of two major pieces of legislation: a regulatory-reform measure and a voter ID bill.

On regulation, Gov. Perdue entered the 2011 legislative session expressing clear support for major reform ideas such as weighing the costs and benefits of proposed rules and limiting the disparate impact of regulation on small business. But when a regulatory-reform bill passed both houses with large, bipartisan majorities, Perdue decided to veto it.

Why? Environmental extremists credited her with stopping regulatory reform because it would prevent the state from protecting air quality, water quality, and human health. But not only were they wrong about the issue, they were also putting words in the governor’s mouth. Her explanation for the veto was a technical one: that a provision straightening out longstanding problems with administrative law judges is a violation of the constitutional separation of powers.

Republican leaders and lawyers rejected her contention. So did key Democratic leaders and lawyers, including Senate Minority Leader Martin Nesbitt.

Under current law, if a regulated party challenges a state regulatory agency over a contested rule, the matter goes before an administrative law judge. If the regulatory agency doesn’t like what the judge says, it can ignore it. The regulated party must then appeal to a local court of law.

The bill fixes the problem by making the administrative law judge’s ruling binding on the agency. Both sides could still appeal to the local court. But if an agency can overrule an adverse finding of an administrative law judge, what’s the point of having administrative law judges?

Contrary to Perdue’s claim, there was no separation of powers problem here. Administrative law judges aren’t employees of the judicial branch. They may not be under Perdue’s direct control, either, but in North Carolina we don’t confer all administrative power to a single elected governor.

On Monday afternoon, the House overturned Perdue’s veto of regulatory reform by a 76 to 42 margin. It was a clear loss for the governor (and a clear win for the state’s economy).

The situation is not so clear-cut with respect to another key veto, of the voter ID bill. We all know the arguments for and against a requirement that North Carolina voters present a valid photo ID at the polling place. There’s a tradeoff between election access and election integrity. On balance, I think the case for the requirement is stronger.

The number of legitimate voters blocked from voting should be minimal, based on experience in other states and the availability of free IDs for voters who lack them. The benefits include a lower risk of voter fraud and greater public confidence that their legitimate votes are not being cancelled out by illegitimate ones.

However, most Democrats don’t see it that way. They argue that whatever benefits the bill might bring aren’t worth the costs. It seems unlikely that enough House members will cross the aisle to overturn Perdue’s veto.

The Democrats’ problem is that such a “victory” is really a loss, politically speaking. Whether Democrats like it or not, the vast majority of North Carolinians favor photo ID. They will look at opposition to photo ID with suspicion. It will give Pat McCrory an effective weapon against Perdue in the 2012 gubernatorial election.

If Democrats understand this and are willing to take the political hit for their principles, I can respect that. If they don’t understand it, they are deluding themselves.

Hood is president of the John Locke Foundation.