(bug 44298) Use inArray to fix breakage in IE.

Change-Id: Ieac2b7d8499f3a335606590d3dd3c556059a884a