Would it be possible for you to provide a smaller simpler example use of DoMySumPartition, show what the result is and what the result should be.
When I run your example notebook I do not get the small result you show, but rather a 50 line sum of products of v, zFlat, zl and zr. Perhaps something has been left out of your notebook.
Is there any reasonable way you could try writing this without using Subscript? I realize many people are compelled to use Subscript and think this is the same as any other variable. This is not the case and again and again people write "why doesn't this work" and it turns out that it involves using Subscript.