fix bug in LabelImages.keepLargestLabel for stacks