It's not a bug per se... It's always been like if you have mixed medals, it will always choose the highest level medals first, then if it's not enough it will add the lower tier medals.
That's why if you have mixed medals, always check your great hall often, and use the upgrade immediately after your highest medal is enough
For example you want to upgrade level 4 GH bonus, it needs 400 silver. You have 250 silver, and you are now at Gold tier and collecting gold medals, so you need only 75 gold medals. You have to immediately upgrade that lvl 4 GH bonus once you have gain 75 gold, the silver medals used in the upgrade will be reduced as you gain more and more gold medals.
For example if you gain 100 gold medals, the medals used for that lvl 4 GH upgrade will be 100 gold + 200 silver, meaning you will have extra 50 unused silver medal.
I agree that it should be counted with lowest medals first, but currently it is not a bug, it is how they count it.
Edit: so in your case, that you now have 400 gold, it will always force you to either use 400 silver or 200 gold, I am sorry but currently the only way to do it is either to go back down to silver and gain 100 more silver medals OR use the gold medals, and use the silver medals on other upgrades (when you have not enough gold medals)