Given a list slice `li[i:j]`, the parser will crash when `i > j`. Add a check to raise IndexOutOfRange. Also add some tests.