Rethink our indexOf implementation