fix bug #64146 (serialize incorrectly saving objects when they are
cloned)