I think this code will be easier to understand if you process the normal accumulator separately and then loop over the `[1...]` accumulators separately.  Then you can easily pull out the blocks array creation and reuse it for the loop.