just a guess here, but maybe your lockring is loose, and you had previously loosened the cog while skidding or resisting to slow down, then when you stomped on it to make the light the cog spun forward a bit causing your feet to slip for a sec?
Try tightening the gog down HARD with a chainwhip, then use a good lockring tool (pliers are best) o see if you can get the lockring tighter. If the lockring moves it was loose.