Argitoth,
I like your solution better than Taqwus's, which would effectively deny all AIs access to this relatively low-level spell that might help their SCs.
A relatively simple solution would be not to cast this spell when it will harm nearby friends or when it's unnecessary in that the entire enemy army is routing.
But I still like your notion that we should be able to tell all mages in the nation what spells they are never to cast.

Using a little check box that can be unchecked during the course of the game.
Druids...don't cast berserkers on my other commanders. Don't cast protection on any Abyssians.
I think the problem here is the same as in the case of archers at times...the AI isn't considering damage to nearby friendly units when deciding on a course of action.