Hurricane season is upon us. It would be a terrible time for the federally backed insurance that allows millions to live near the vulnerable coastlines to go out of service. But that’s almost what happened.

On Thursday, Congress finally gave a temporary reprieve to the National Flood Insurance Program (NFIP), which had been set to expire at midnight Friday. More than 2 million of the program’s policies are in Florida.

Earlier, the House and Senate had broadly approved a short-term extension to keep the program running through Sept. 30, but – true to the dysfunction that defines so much about Washington these days – the bill then stalled, in tandem with the much-delayed $19.1 billion disaster relief bill for the hurricane-ravaged Panhandle and Puerto Rico. A handful of conservative House Republicans twice held up the desperately awaited legislation, nearly leaving property owners in the lurch when it comes to writing new policies.

But on Thursday, with the flood-insurance program on the brink, Congress extended it for two weeks (while the disaster bill stayed in limbo). When lawmakers return to work from recess on Monday, they’re expected to pass yet another temporary extension – the 12th in two years.

That’s ridiculous – but no less ridiculous than the ways in which this program rewards terrible behavior. By making flood insurance unrealistically cheap, it encourages property owners to build in areas where flooding can be expected – and then to rebuild in exactly the same place after disaster has struck.

As we’ve pointed out before, more than 30,000 properties have flooded an average of five times each and been rebuilt each time through the NFIP. Some of these properties have been flooded more than 30 times.

And because of rising sea levels, high-risk coastal plains may expand by 55 percent by 2100, exposing much more property to damage, a FEMA study estimates.

Put it all together, and the NFIP is in mind-boggling debt: $24 billion. This shortfall would be $40 billion, except that the Trump administration forgave $16 billion in 2017, adding that much more to the federal deficit. The debt forgiveness was supposed to be paired with reforms, but – in an all-too-familiar scenario – the reforms never came.

The situation is the very definition of “unsustainable.”

Last month, four former directors of FEMA, which administers the insurance program, wrote to congressional leaders urging that they make basic reforms: disclose flood risk to homebuyers; create a state-administered federal “revolving” loan program to help buy out homeowners with repeatedly flooding properties; improve flood mapping; and require communities to draw up plans for areas that repeatedly flood.

Lawmakers should listen, and follow their advice.

Fixing it won’t be easy. Too abrupt a change could shatter the economies of many beachside communities as insurance that now costs a few hundred dollars soars into the thousands. But gradual reforms are long overdue, along with steps to soften the blows for people with smaller incomes.

This editorial originally appeared in the Palm Beach Post.