Shutting off completely is not really the right thing to do in a rear slide/spin scenario....although it is instinct I guess.
Shutting off completely can cause the rear wheel to re-grip aggresively which will spit you off the bike.
Glad you survived on this occasion, could have been an expensive day