allIndexes is only used within findQualifiedIndex -- initialize it there. The same is true of the other arguments to findQualifiedIndex -- it needs no arguments.