copyAttribute() crashes when String Item does not have a default index
Copying a value item definition of discrete type without a default index incorrectly sets the copy's default default index. To reproduce, you can use this example
<String Name="volumeMode" Label="Specification mode">
<Categories>
<Cat>multiphase-compressible</Cat>
</Categories>
<DiscreteInfo>
<Value Enum="Absolute [Power]">absolute</Value>
<Value Enum="Specific [Power/Volume]">specific</Value>
</DiscreteInfo>
</String>