The provided range, given by start and end, must be valid.
A range from start to end is valid if 0 <= start <= end <= len, where
len is this list's length. The range starts at start and has length
end - start. An empty range (with end == start) is valid.

This method does not work on fixed-length lists, even when replacement
has the same number of elements as the replaced range. In that case use
setRange instead.