I can't see anything shield related in Shiradi. Anyways, right now I'm leaning towards changing my build from rog 2 wiz 18 into rog 2 ftr 1 wiz 17, with the fighter level taken on level 2, thus no need for Fred shenanigans. Nets me two more feats, essentially, with the loss of one imbue die and a caster level.
I'm a little confused by what exactly you'd be doing.
If you're using a heart of wood to swap a toon from 18/2 to 17/2/1, then you won't have to worry about swapping the feat out as you'll have to re-select all your feats anyhow. Then it's just a matter of swapping around when you'd take certain feats to make sure you can still take everything when you want to.
If, instead of swapping a level you have a toon that still has a few open levels, and you're debating between taking the fighter level or another wiz level, then no, you wouldn't be able to swap out shield proficiency if you've already taken the Shield Mastery feats. When you take levels, the game "snapshots", or uses your current (Or, soon to be current, since it considers the level you're actively taking) feats/ability tomes/skill point investments into consideration when determining your available feats. You'd have to first swap all feats dependent on the prerequisite feat.
For example:
Let's say you have a toon, 12 wiz/2 rogue. You took Shield Proficiency at level 3, and Shield Mastery at level 6. If you were to take a level of fighter as your next level, it would autogrant you Shield Proficiency. You'd also be eligible to take Improved Shield Mastery on that level-up, as you'd be bumping your BaB up from 7 to 8. However, you would not then be able to retrain the lv 3 selected feat as it's a prerequisite for Shield Mastery, and you didn't have the prerequisite feat Shield Proficiency when you took the level 6 feat.
However, if you were to use a heart of wood, and swapped your first level (Or levels 2 or 3) for a fighter level, you'd be autogranted S. Proficiency then, and you'd still be able to take S. Mastery at 6 and Imp. S. Mastery at lv 15 (the earliest this toon could take it).
Hopefully that makes sense. I've run into this problem when doing ranger splits, as I'll frontload some other class, and take the Two Weapon Fighting feat with the intention to swap it out later before taking lv 2 ranger. If I accidently take Improved TWF before taking lv 2 ranger, I'd have to do a double feat swap to get those two feats back.