When you increase the sampling rate you are starting to measure various higher order frequency harmonics associated with the DAC signal generation, ADC signal measurement, etc. These are some of the causes of the glitches you see when measuring with an ADC.
By decreasing the sampling rate you aren't able to properly sample/measure the signals with higher frequencies. I had a hunch something like this was going on when every 3rd wave looked bad.
What exactly are you trying to measure? The waveform shape, RMS voltage, or both?
If you want to measure a clean waveform shape try a higher sampling rate that isn't an integer frequency harmonic of the waveform you are sampling to see if it helps.