Port of #30003 (5.x) to 4.x. The scalar step of sum_() added four elements to each other in the source type before the double accumulator, so 32-bit values overflowed.