fix [start, end] for 0 indexed arrays

When setting 0, 0 on an empty array, check for a range before checking that start >= the current length.