I just got the weird Rain Dance/Sandstorm glitch again, this time when my Tyranitar used Pursuit against a Starmie switching out. But I have used Pursuit plenty of times without getting the glitch. The circumstances were largely the same as the last time I got the glitch; Tyranitar switched in on Starmie's Ice Beam, Starmie switched out, as I Pursuited for the KO. Then the damaging rain began. I was, of course, battling using Platinum. From what I can tell, this glitch may have something to do with using Pursuit on a fleeing opponent in the sand.