Handled the case multiple slices are used in the same method.