Error while transferring functions from coarse to fine mesh on a hollow pressure vessel geometry

I’m encountering an error when transferring a function from a coarse to a refined mesh using DG0 function space. The code works perfectly with both meshes with CG1 function space, and also with DG0 but with simpler geometries, but fails with a hollow pressure vessel with DG0.

The error is:

Reason: Mesh entity index -1 out of range [0, 7328] for entity of dimension 2.

It seems related to the mesh complexity or geometry. Has anyone encountered this issue or have insights on handling DG0 transfers on complex surface meshes? I have the minimum code to replicate this issue.

from dolfin import *
import numpy as np

# Define the function to transfer functions between spaces
def transfer(from_fun, to_fun_space):
    from_fun.set_allow_extrapolation(True)
    V1 = from_fun.function_space()
    V2 = to_fun_space
    A = PETScDMCollection.create_transfer_matrix(V1, V2)
    f2 = Function(V2)
    f2.vector()[:] = A * from_fun.vector()
    return f2

mesh_list = ["senp/mesh.xdmf","pressure/mesh.xdmf"]

mesh = Mesh()
with XDMFFile(mesh_list[0]) as infile: # 0 works but 1 does not
    infile.read(mesh)
mesh_fine = refine(mesh)

V_coarse = FunctionSpace(mesh, "DG", 0)
V_fine = FunctionSpace(mesh_fine, "DG", 0)

# Define a sample function on the coarse mesh
from_fun = Function(V_coarse)
from_fun.vector()[:] = np.random.rand(V_coarse.dim())  # Random values for testing

# Perform the transfer
to_fun = transfer(from_fun, V_fine)

Here is the link to the mesh files: mesh.zip - Google Drive

I have also tried to use L2 projection, but get the same error with the pressure vessel.

Complete error message:

*** -------------------------------------------------------------------------
*** Error:   Unable to create mesh entity.
*** Reason:  Mesh entity index -1 out of range [0, 7328] for entity of dimension 2.
*** Where:   This error was encountered inside MeshEntity.cpp.
*** Process: 0
*** 
*** DOLFIN version: 2019.1.0
*** Git changeset:  74d7efe1e84d65e9433fd96c50f1d278fa3e3f3f
*** -------------------------------------------------------------------------