The bad thing is that they get gems left they can cast some really ugly spells, like mass protection against abysia

So better script them some gem-using spell after the one that you want to cast. So if they have gems cast they waste it on that, not something dangerous. And if not - at least they will pick instead another spell that does not require gems.