Also fix the references inside the native code.