This change aims to resolve the issue reported in https://github.com/llvm/llvm-project/issues/59994.
After calling AffineForOp#setUpperBound and setLowerBound, it makes the original affine map structure inconsistent. It's necessary to keep the original map to build the new induction vars.
Use the range-based ctor or use llvm::append_range to write this more compactly.