This accounting used to be done during the detection of self-similarity and when I removed it, I apparently broke this. I'm not surprised you've been seeing inconsistent results. I actually wonder if some of the `num_rewrites--;` have been incorrect, too, because they are decrementing a counter that was never properly increments to measure the number of splits.

I think we may want to get rid of this increment here and instead put the equivalent lines into the "Label rename sources and targets" loop up at the top of the routine where the splits are first marked.