Make _accumulateWithSeed iterative, so we won't run into stack limits

This should fix issue #2