Using Queen of Thorns, have an allied demigod stand near you. Mouse over the other demigod so that they are highlighted and cast her shield spell.
Notice that the shield gets cast on you, not the nearby ally.
It seems that the targetting logic for what is highligted is different from the targetting logic actually used to cast the spell. I don't really care which logic is used, as long as what is highlighted is what gets cast on in the end.