Sum: tests and fixes for more edge cases in fast path

--HG--
branch : specialize-sum
1 job for branch/specialize-sum in 7 minutes and 12 seconds (queued for 1 second)
latest