Fixed #2227, waterfall breaking with more than one intermediate sum.