Last month, the federal conservator of Fannie Mae and Freddie Mac issued significant new policies streamlining the process for short sales, through which underwater borrowers can sell their home for less than what they owe on their mortgages.

Industry experts and economists agree that more short sales are critical to our housing recovery.  They help avoid lengthy and costly foreclosure processes, prevent vacancies, preserve local home values, and provide much-needed mobility for struggling homeowners who wish to move.

But any progress toward promoting short sales could be swiftly undone if Congress fails to extend and broaden a little-known tax protection that's set to expire at the end of the year.

Short sales require the lender or investor in the mortgage to take a loss on the property by forgiving some of the borrower's mortgage debt. Until 2007, the tax code treated such forgiven debt as taxable income to the borrower. Tax advisors call this "phantom income": the individual does not actually receive a payment, but is taxed just the same.

During the early stages of the housing crisis, Congress passed the Mortgage Debt Relief Act of 2007, which exempted certain types of forgiven mortgage debt from federal income taxes. The law is set to expire on Dec. 31.

If Congress fails to extend the exemption, millions of already-struggling families would face a substantial tax payment shortly after working out a deal with their mortgage lender. Failure to extend the policy also would reduce the effectiveness of other foreclosure prevention efforts that include writedowns, such as  deeds-in-lieu-of-foreclosure and principal reductions – a centerpiece of the recent Attorneys General settlement with mortgage servicers and an important component of the Obama administration's Home Affordable Modification Program.

In fact, even those who lose their homes to foreclosure could see their taxes increase. If the lender or investor writes off any losses accrued through a foreclosure sale – as opposed to suing the former homeowner for the shortfall in the states where this is permitted – that forgiven debt would be treated as taxable income to the borrower.

To avoid this perverse result, a diverse chorus of investors, industry trade associations, consumer advocates, and civil rights groups has called for the law's extension. In a rare act of bipartisanship, the Senate Finance Committee this month extended the tax protection as part of the Family and Business Tax Cut Certainty Act (the bill has yet to hit the Senate floor).

However, simply extending the current exemption is not enough. Lawmakers also should take this opportunity to broaden the law slightly so that more struggling homeowners can take advantage of it.

The current law exempts only the portion of a mortgage used to purchase a home or make major home improvements. If the homeowner refinanced the loan for more than the original mortgage amount, using the additional funds to consolidate bills, pay for minor home repairs, or cover education or medical costs, those portions of the mortgage are still taxable.  

This rule may have made sense in 2007, when the scope, depth, and impact of the housing bust were not yet clear. But if we've learned anything over the past five years, it's that unnecessary foreclosures cause the same problems for investors and communities whether the mortgage was a home purchase loan or a cash-out refinancing.  In trying to fix the mortgage mess, it makes little sense for the tax code to differentiate between the two.

What's more, treating portions of a mortgage differently adds a level of complexity that discourages all homeowners from using the exclusion, even those with purchase mortgages.

Right now, to claim the exemption offered by the Act, a taxpayer must file two long and complex forms: a long-form 1040 and a Form 982. Many taxpayers either don't understand this requirement or can't get the assistance they need to fill out the forms. If the Act treated all mortgage debt equally, the IRS could simplify this process significantly

While the housing market is beginning to look up, the millions of homeowners still underwater pose an ongoing threat to recovery. The last thing these struggling homeowners need is an unexpected tax obligation for amounts that their lenders have already agreed to forgive. A small fix now could help prevent big problems later.

Mark Goldhaber, a 30-year veteran of the mortgage finance industry, runs Goldhaber Policy Services. Julia Gordon is the director of housing finance and policy at the Center for American Progress