Fix reduceRight for the empty array, initial value combination

The do-while loop would be infinite as the counter is already at -1 on the first iteration.