Add test for the fixed crash with the opt merge of slices.