Using native indexOf instead of contains.
Similar to previous commit 7b3e079.