Fixed LabelSetImageIOTest failure
Reason was, that the layer index was not set properly if a new layer was added.