No. Flygon should only be hit by spikes if gravity is up. The opponent having mold breaker (and using EQ) had nothing to do with that, because the ability is only nullified during the attack of rampardos.
This is just a bug, but SB2 will come out soon anyway, with active support for bugs, so...