add test to check that unsorted or duplicated slice indices raise error