fdo#84009: Be sure to update the sheet index when moving the sort range.

Change-Id: Ic9ad51b33f6dfb6f90e76439c27eeff25ec4c7da
fdo#84009: Adjust the test case to catch this.

Change-Id: I16bdc6760276b5bc0c78c3693d3f92c68ef67ed1