Fix the NmObject_Dup function.