Make construct_union_mesh work with weird meshes.