Add shallow copy support to clone and applyToDefaults