One way to avoid it is sentient magic. And one way to do that, is to put the results of the magic in the hands of other players.
In a small group that's a game of "How much is it worth to you" and deal making with your competitors.
Online, you could have trust tracking, and an economy. As well as the occasional moment of "Ah crap, that guy I'm fighting? That's the guy currently providing my magic. Run for it!"