What is causing an intermittent side to side wobble of the rear cogs? I am struggling to diagnose the cause of an intermittent side to side wobble of the cogs on a rear wheel. Here's what I know:


Periodically (maybe every 10-15 minutes) during a ride, I experience slippage between gears not associated with shifting.  A glance at the rear cassette while continuing to pedal reveals the cause: the rear cogs are all wobbling side to side, a few mm each way.
The wobble is in sync with the rotation of the cogs: slow pedaling = slow wobble, fast pedaling = fast wobble, no pedaling = no wobble.
If I stop pedaling, coast, and then resume pedaling, the wobble goes away.  I can't say for certain whether the inverse is true: that the wobble always starts after coasting, by the time I notice it, I can't be sure exactly when it started.  Nor can I say for certain that it goes away every time after I coast--I just know that by coasting (even briefly) and then pedaling, I can eliminate the wobble (for a while).
With the wheel off the bike, I have not been able to reproduce the wobble.  There does not appear to be any plan in the hub or the cassette. I have checked that the cassette is securely tightened to the freehub and it is. There is not noticeable play in either the freehub or the cassette.
With the wheel on the bike and the bike in a stand, I haven't been able to reproduce the wobble either. I have tried moving the pedals slowly while watching the rear cassette, stopping the pedals, and re-starting and ran out of patience before seeing the wobble.
I do not believe the whole wheel is wobbling. This is tough to know for sure since I have only witnessed the behavior on the bike, but to my distracted on-the-bike eye, the wheel is rim is rolling true while the cogs wobble.
The hub is a Velocity Road Rear Hub, the cassette is a SRAM PG-970 9 Speed


What are the most likely causes of this behavior? What additional diagnostic or troubleshooting steps would you recommend?
Check:


Freehub body: no play radially? laterally? Try to reproduce it when lightly apply the brake (with barrel adjuster) and hand-pedal while the bike on stand. does it still wobble?
Cassette spacing: remove the cassette and see if there is any irregularities in the spacer.