Fixed: Use now the obvious indexOf
(cherry picked from commit 052b382)