* Patch from Alexey T. closes #39705 * don't use copy in helper.indexof(). Watch those 0 based indexes. (cherry picked from commit d25daba08a0fc72cc646a0cf79e60695cb76397f)