Fix cloning behavior of objects/arrays.