Optimize index map use to eliminate array_search() calls, refs #1196