Possible With Class Changing, Spell Mastery Perk, and Mana Cost

I noticed that my Lord Zankai has a Volcano Gem that costs 28 mana, a chaos creature with a chaos gem. But in battle, it costs 42 mana. I wondered why this happened, then I realized that my class changes because of my Sphinx.

I don’t remember my spells always getting more expensive when a class changes, but then I remembered I had the perk “Spell Mastery” that allows my creatures to cast any spell, but it’s an increased mana cost if it’s not of their native class.

I think that the game is registering them as equipping a non-class gem, thus increasing their cost, even though they actually are that class but it’s just changed in battle.

EDIT: Yep, when Sphinx chooses Chaos, it’s normal cost.

This is how it is intended to work.

So it’s a penalty for using it in a way? It’s a chaos gem equipped to a chaos creature. If I didn’t have Spell Mastery I could cast this same spell on this same creature for cheaper. This is a spell I could equip to my creature without having this perk. Having this perk did not enable me to equip this spell o.o

Just making sure, did I phrase it wrong? I think it’s weird for a perk to penalize you in a way o.o