fix rsearch for arrays by adding fallback nextind etc. fixes #3679