Issue-3917 switched the direction  for indexOf

switched the direction that indexOf searches for matches.  the typical
case involves the event being at the end.  greatly improves performance
in IE8 using the {{#group}} helper