Ensure that stack overflow does not occur for dense-packing for masonry with 10,000 tracks