Correct Iterator protocol error in CommandStream. (hasNext can be called multiple times between calls to next.)
Correct Iterator protocol error in CommandStateReduction. (hasNext can be called multiple times between calls to next.)