am 51997559: Fail if the new index is out of range. do not merge.

* commit '519975591eba13ae7ac4e494a0dfb88a34ca191b':
  Fail if the new index is out of range. do not merge.