Improve internal logic of Array#eIndexOf