When pushing D in their example they overwrite the value to be read and items are out of order now.
But maybe I'm missing something, I lost interest at all the bit-twiddling.