How do I remove the overuse of iron penalty?

In Civilization 5, I used more iron than I had access to. (I maxed out my actual iron by building swordsmen, and then I built the Terracotta Army, which gave me a bonus swordsman, putting me at -1 iron.) The game then began showing me this symbol and warning on every turn:

The over-allocated iron warning

The text of the warning reads:

You are currently using more Iron than you have! All units which require it will fight much less effectively.

A few turns later I researched gunpowder and upgraded some of my swordsmen, so I'm no longer using as much iron as I was before. The strategic resources tooltip verifies that I'm using less than my max:

Strategic resources tooltip showing 1 iron used, 4 total

However, the resource overallocation warning still shows on every turn. How do I get rid of this penalty?


As said on Gamefaqs:

Presumably after having enough resources again:

I've had this before and I think it is a bug. When I got into a battle with supposedly affected units, there was no penalty.

What has fixed it for me in the past is just shut down the game and reload.?