Ok, i did some tests.
In frost: 2055 average ice lance hit https://i.imgur.com/cPppzWf.png
In arcane with 32.14% mastery: 2695 average ice lance hit https://i.imgur.com/P64RaMg.png
2695 / 1.3214 = 2039 (pretty close)
Also, arcane mastery increases the damage after the spell consumes mana. So, with full mana (300k/300k), when we cast ice lance (consumes 3k mana), the mastery will give a bonus to damage: % mastery * (297k / 300k) = 32.14% in my case * 0.99 = 31.8186%
Idk, if it's a bug or not, but everything else is correct.