Check that discrete item has default before copying default index
ValueItemTemplate::copyTo() was copying the default discrete index whether is was actually set or not. This fixes the underlying cause for #253 (closed).
ValueItemTemplate::copyTo() was copying the default discrete index whether is was actually set or not. This fixes the underlying cause for #253 (closed).