ob.DupObjects was working but giving a warning. Fixed the warning and it also works in all test cases.