Auto-translated
Yes, the bug was indeed annoying. I didn't notice it right away.
Here's the fixed version.
https://yadi.sk/d/wHCTAs-DPsBAyg
Added 4 minutes later
Now it works like this.
On the second level (i.e., Regular upgrades), upgrades can be swapped between each other.
Provided that a level 3 building has been constructed, a level 2 upgrade can either be converted into one of the level 3 upgrades or into another level 2 upgrade.
Level 3 upgrades can simply be regraded between each other.
It is not possible to downgrade a level 3 upgrade to a level 2 upgrade.
However, there is one bug, but I don't think it's critical. Regardless of the building level, when converting a level 2 upgrade to another level 2 upgrade, the cost is not deducted from the player.
So I didn't even notice this bug; the regrade cost is almost nothing in my game.
I tested it, and it works. It turned out to be quite an interesting mechanic =)
Was the bug fix only in the two .xdb files for Creatures, or did you tweak something else as well?