CQM: check loop vars more carefully.