Better implementation to ensure copyWithZone and dictionaryRepresentation use same deep copy code