Comparing key to array[idx] is redundant as findIndex already performed key comparison to find the index.
Screened by: Alex Miller