Lawmakers fell short on some high-profile bills in the even-year session that ended last week, including the Columbia River Crossing, gun control and marijuana legalization.

But the Legislature did close a loophole that medical insurance providers have used to stick taxpayers with medical costs for some inmates held in county jails. The bill not only righted an expensive wrong, it scored a relatively rare success for President Obama's Affordable Care Act. 

Federal law requires that jails and prisons provide medical care for jail and prison inmates after they have been convicted. But who's responsible for paying the medical bills of those awaiting trial has been a matter of dispute.

Under current practice in Oregon, if a person with private medical insurance gets arrested, the insurer can refuse to pay for any medical expenses incurred following that arrest but before the person is either released or convicted. Such refusal shifts the costs to the county jail.

A survey of jails last year suggests the total cost of that shift to Oregon counties is between $2.5 million and $5 million annually. "This has been an ongoing concern for sheriffs for a long time," says Darrell Fuller, a lobbyist for the Oregon State Sheriffs' Association. 

Fuller says taxpayers and inmates are getting short-changed. "It's wrong if somebody is paying a premium and not getting service," Fuller says.

Nancy Griffith, who runs health services for inmates of Multnomah County's jails, says about 9 percent of those arrested in the county have private insurance. It costs local taxpayers at least $500,000 a year to pay for health care that private insurance should be covering, the county found. 

In most of Oregon, the county government operates the local jail. Health-care costs are a large and fast-growing cost of jail operations, because people who get arrested are far more likely to be mentally ill, suffering from addiction or otherwise less healthy than the average Oregonian. 

In 2012, for instance, Multnomah County spent $87 million on its jails. Nearly $14 million of that was for inmate health care. 

Shifting responsibility to pay for health care costs local governments millions at a time when they are already struggling to pay for jail beds.

Columbia County is closing its jail in June, and jails in at least three other counties are barely hanging on, according to the sheriffs' association.

Linn County Sheriff Tim Mueller provided lawmakers with an example of one man who, after being arrested in 2010, required five days of acute-care hospitalization at a cost of $51,312.97. Initially, the man's private insurer agreed to pay—then learned the man was in jail.

"After discovering that he was in custody during his hospital stay, the hospital had to reimburse insurance and we were billed the full amount," Mueller said in written testimony.

Until now, insurers have avoided their responsibility to cover customers who have been arrested simply by inserting an exclusion in their policies for people who are incarcerated. Such exclusion provides insurers a pretty big savings, and they lobbied hard to keep it, defeating a previous challenge during the 2013 regular legislative session. 

Health insurers, such as Cambia Health Solutions (formerly Blue Cross), Providence and LifeWise, have a strong network of lobbyists in Salem, and they keep lawmakers' attention by giving them steady campaign contributions. 

"The exclusions existed in the past because we lose the ability to communicate with our members and manage costs for high-acuity cases when someone is behind bars," says Tom Holt, a lobbyist for Cambia.

But Fuller says Multnomah County lobbyist Claudia Black found a solution that insurers could not overcome.

At Black's suggestion, state Sen. Laurie Monnes Anderson (D-Gresham) sought legal guidance from Legislative Counsel Dexter Johnson whether private insurers could continue to exclude pretrial inmates under the Affordable Care Act, also known as Obamacare. The answer: It's now illegal for insurers to do so.

Federal law trumps any exclusion Oregon insurers might include in their contracts, and so a bill that insurers were able to kill in 2013 rolled unanimously though both houses last month. 

Fuller says the bill's success marks a rare example of private insurers not getting their way in Salem and may pave the way for further cost recovery in the future.

About 20 percent of those arrested have some kind of government-based insurance—either through the Veterans' Administration, the Oregon Health Plan or Medicare. Eventually, counties hope to force those public insurers to cover inmates' pre-conviction costs, just as private insurers will now have to do. 

"This is a big first step," Fuller says. "It's a step toward spending public safety dollars on public safety instead of health care.”