@targettarget macro command not working with Arcane Missiles

To simplify what i’m explaining, if I have a macro for my mage that simply says the following, it will throw an error stating ‘target is friendly’, even if my target’s target is attackable/hostile:

/cast [@targettarget] Arcane Missiles

If I replace the spell name with literally any other spell (for example Frostbolt), it will work without issues.

So using @targettarget with arcane missiles isn’t working.

/cast [target=target,help,nodead,harm] [target=targettarget,help,nodead,harm] [nochanneling:arcane missiles] Arcane Missiles

goes by priority, if target is enemy cast it on them, if target is friendly target friendly target (so you can have the tank targetted) also prevents clipping your arcane missiles by preventing you from casting it before the last part of the channel is finished.