ND2: one more adjustment to loop state parsing

Fixes #10939.