InferType crashes when a relay function call another function

When I play with relay, I meet the following unexpected crash caused by InferType. Below is my script,

import tvm
from tvm import relay
mod = tvm.IRModule()

x1 = relay.var("x1", dtype='float64', shape=())
y1 = relay.log(x1)
F1 = relay.Function([x1], y1)
mod['F1'] = F1

x2 = relay.var("x2", dtype='float64', shape=())
f = mod.get_global_var('F1')
y2 = f(x2)
F2 = relay.Function([x2], y2)
mod['main'] = F2
print(mod)

mod = relay.transform.InferType()(mod)
print(mod)

And the crash message generated by TVM_BACKTRACE=1 is

I am not sure if it’s my fault to cause this problem. Could any expert give me a hint? Thanks in advance.

I open an issue in github [Bug] InferType crashes when a relay function calls an global identity function · Issue #10398 · apache/tvm (github.com). The example here is more concrete. I think it maybe a bug.

I have commit a fix in here. Could any developer take a check on my fix? This is my first time to submit a patch and I am not sure if I make it correctly with my shallow understanding of TVM.