[Olena-patches] 3313: Update segmentation code.