This should return the index of the largest element, not the element value.  Then we won't need `getFirstIndex` either.