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 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:
However, the resource overallocation warning still shows on every turn. How do I get rid of this penalty?
Pictures about "How do I remove the overuse of iron penalty?"



CS:GO - Matchmaking Penalty \u0026 Cooldown Explained
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: ready made, Ksenia Chernaya, Ksenia Chernaya, Antonius Ferret