Fix LLVM assertion error when removing a native function that has been recompiled in-between