I think you would want to `continue` after this, as the `foreach` below is redundant. We've already matched an index (possibly less efficient) by this point, so there is nothing left to do. I'm having difficulty tracking the entire code flow, but is there a chance we might add the index to `$matchingIndexes` twice with the code as-is?