nodestack: rename 'iter' to 'head_idx'