Congressional negotiators included a partial fix for the so-called “widow’s tax” in the final draft of the fiscal 2018 defense authorization bill, but paying for it will mean higher prescription drug costs for some military beneficiaries.

The legislation, released by officials of the House and Senate Armed Services Committees on Wednesday, makes the Special Survivor Indemnity Allowance a permanent payout for the first time. That stipend had been set to expire next spring, taking away about $300 a month for some military widows and widowers.

The SSIA payouts are a partial fix to an ongoing benefits problem that has frustrated military advocates for decades.

Currently, individuals who receive Defense Department Survivor Benefit Plan payments and Dependency and Indemnity Compensation stipends simultaneously see their total payouts offset, even though the programs aren’t linked in any way. As a result, grieving families lose up to $15,000 a year in benefits they had expected to receive.

The issue affects about 63,000 families nationwide. Fixing that offset issue would cost more than $1 billion a year, money that lawmakers on the committee have repeatedly said they cannot find in ever tightening military budgets.

But lawmakers created the SSIA program in 2008 to try and make up some of that loss. As of fiscal 2017, eligible survivors can receive more than $3,700 a year from that — still only a fraction of their offset losses.

And lawmakers have had to repeatedly reauthorize the program every few years. Now it will be made permanent, reducing the anxiety for families who have grown dependent on that benefit.

The move is expected to cost about $2.8 billion over the next decade.

To pay for it, negotiators included new Tricare pharmacy co-pays that had drawn criticism from outside advocates.

Under the plan, co-pays for name-brand drugs will nearly double over the next eight years. Co-pays for generic drugs at retail will rise from $10 to $14 over the same period. Those changes are expected to create nearly $3 billion in new revenue that will cover the SSIA program costs.

But military advocates have in the past bristled at the notion that benefit increases for some military groups must be paid for with decreases in other programs or new fees for other troops.

Committee officials said that offset is the only way to move ahead with a fix to the “widow’s tax” issue given existing defense spending caps and House budgeting rules.

In a statement, Military Officers Association of America President Dana Atkins said his group was “grateful” for the SSIA fix but “disappointed the funding solution requires military beneficiaries, not the government, to bear the costs.”

”We will continue to work with both Armed Services Committees for total repeal of the SBP-DIC offset,” he said.

House lawmakers had made finding a solution to the SSIA issue a priority in negotiations this year, given the pending May 2018 expiration of the program. They touted the agreement as one of the highlights of the annual budget bill on Wednesday, along with military pay and end strength boosts.

The measure now moves to the House and Senate chamber floors. Lawmakers have until mid-December to work out an appropriations plan for the final nine months of fiscal 2018, and that decision is likely to affect the timing of a defense authorization bill vote, because of connected military funding issues.