This bug occurs if you use the Arcane Refinery to disenchant multiple spell gems at one time. I’ve attached screenshots showing the sequence of the bug in action. The spell gem originally equipped is missing from my inventory. The game substitutes another spell gem from my inventory in its place.
The first screenshot shows the spell gem before I begin to disenchant it. The second screenshot is after the disenchantment. The third screenshot shows my attempt to enchant the same spell gem, but it shows a different spell gem equipped. The fourth and last screenshot shows that the same substituted spell gem is still equipped after I exit and reload my game. The original spell gem no longer exists in my game.
Device: Apple iPad Air 1
Operating System: iOS 10.3.3
Game Version: 2.4.5 (although the in-game title screen incorrectly shows 2.4.4)