As Rudy (aka, Zona) notes, if the wobble went away after the sand incident, then there's a pretty good chance that it was an isolated incident caused by your encounter with the sand.
I can easily imagine a scenario where the front wheel hit the sand that caused a direction change of the front wheel / steering input that your captain had to counter. It's quite possible that the quickness of the steering change and countersteer reaction by your captain caused both of you to begin shifting your weight off center out of sync with each successive turn of the handlebars thereby sustaining the "wobble", if you will, until he brought the bike to a stop.