You son of a gun, good job. I initially looked at the wrong part of the code, my apologies. This part describes it very well: https://gitlab.com/NebulousLabs/merkletree/-/blob/master/ran...
It's basically the same thing. Implementation wise it's slightly different, but it's the same idea.
During the upcoming days I'll add to the paper that you were the first to propose this algorithm.