regression fix: implied global 'i' in _.indexOf() -- thanks to Sveinung Rosaker.
(cherry picked from commit b932867dec302b6a36cab60aa664b2081391b791)