need to pass parentSpanCount up to traverseSpans() somehow