When the machine code was generated the JIT retains a lock to the global values so they don't go out of sync. In the cases of circular references like: int g(); int f() {g();} int g() {f();} we cannot count on the removal order to get rid of the uses. We need to use the replaceAllUsesWith. This is however tricky because the JIT already generated the code for f and g and it doesn't make sense to replace anything with anything else. Thus in order to support that we need to hack one of the JIT callbacks which prevents the replace of values of already emitted code.