[PATCH 2/6] treewide: remove using list iterator after loop body as a ptr