Won't depth always be `1` now in all cases since `segmentCount*-1` will always be negative and Math.max is being used?