Fix slicing result set

Other option would be to delete the whole condition. Does not seem to make a difference if you have a greater value than elements in the offsetEnd.