If it was a doubles match, whatever their other Pokemon was is probably slower than Calyrex-Shadow. If that other Pokemon targeted Gastrodon with a physical move (that it wasn't immune to, like a Water or Electric move), that overwrites Astral Barrage as the most recent move Gastrodon was hit by, and when Mirror Coat looks back, it doesn't ask "Have I taken damage from a special attack this turn?", but rather "Was the single most recent move I've been hit by a special move?" Double-targeting with Astral Barrage + a slower physical move will therefore make Mirror Coat fail.