When Irving Berlin penned the words to “Doin’ What Comes Natur’lly,” he described the concept of moral hazard. It’s a useful illustration of the costly dynamics in the National Flood Insurance Program (NFIP) and Social Security Disability Income (SSDI) — currently ticking fiscal time bombs for policymakers.

“Cousin Jack insured his shack,” Berlin wrote, “and now he plays with matches. He’ll collect, just wait and see.”

In a nutshell, moral hazard exists when a solution can actually worsen the problem it seeks to solve, because of the human response to new incentives it creates — thus the title to Berlin’s song.

The NFIP, operated by the Federal Emergency Management Agency, includes a heavy dose of moral hazard. It makes subsidized government insurance available to individuals who build homes and other structures in known flood-threatened locations, part of a government package that urges flood-prone communities to have flood management programs.

In some cases, the subsidized premium is 50 percent less than what would be required to be actuarially sound. In other cases, no private insurance company in its right mind would write a policy on these homes. There are now 5 million policyholders, and the program’s success in selling cheap and paying high is pushing it toward bankruptcy. NFIP owes $24 billion to the U.S. Treasury from past deficit years.

According to FEMA, there are currently 150,000 structures nationwide that cause 25 percent to 30 percent of all claims, and 5,000 additional subsidized structures are added to this list each year, thus the threatening moral hazard. The subsidized insurance sends false signals, causing more people to build in flood-prone areas, and others — after devastating hurricane losses — to rebuild in the same hazardous locations.

Can we fix it? Maybe. Reformers are calling for higher premiums and competition from private insurance providers, which are currently barred. But as things stand, taxpayer subsidized insurance is here to stay. Cousin Jack need not worry, unless the insurance premiums rise enough to eliminate moral hazard.

The Social Security Disability Income program, which contains its own special dose of moral hazard, is also in the spotlight. The Trump administration proposes to cut SSDI funding by $72 billion over the next 10 years. Why? With 8.7 million disabled former workers now enrolled, at the current pace of spending and revenue, the program will go broke in five years. Something has to give.

Which brings us to a batch of thorny questions: What about SSDI’s beneficiaries? What are the chances they will get better and go back to work? Does SSDI tend to discourage gainful employment?

Backing out of SSDI is costly for beneficiaries who, when approved, receive a tax-free part of their former income and Medicare benefits while in the program. The average SSDI monthly check comes in at $1,032. There are periodic reassessments, and beneficiaries are allowed to earn an additional $1,170 each month by working. Of the 8.7 million former workers on the program, more than 6 million are over age 50. If they can remain on SSDI to age 66, they will move to regular Social Security benefits.

There are some allowances for trial period employment, to see if a return to work is possible. But if SSDI beneficiaries exceed the earnings limit, there is a severe tax of 50 cents in benefits for each excess dollar earned. And if the excess continues without special approval, it’s possible to lose all of the SSDI and Medicare, and that’s a bundle.

Therein lies the nudge to stay disabled. The incentives are powerful. Stay on SSDI. Keep Medicare for life. And avoid earning more than $1,170 monthly from working.

How might moral hazard be reduced, thereby reducing the number of people disabled? By increasing the maximum income that can be earned and the length of the re-employment try-out, and by gradually raising the tax on excess earnings, instead of getting hit with 50 percent right off the bat.

Unlike those who knowingly build structures on floodplains, America’s SSDI recipients are not Cousin Jack, cavalierly playing with fire. They are, for the most part, people who rightfully fear losing much-needed income and benefits. But whether found in flood insurance or disability benefits, moral hazard is dangerous stuff and hard to remove.