Fix AV in gc_heap::init_heap_segment (#131947)