foreach: more const iteration fixes.