there are two issues with the file you posted,
first, event 6 was a compare two values statement, and wont actually pick instances. The code sample in the image you posted above will pick instances and would work - if it weren't for the second issue below.
second, event 6 is a subevent under the "Start of Layout" event, where you spawn the two cards that get rotated. The last one of those is the only instance picked when it gets to event 6. The Wait 0 allows all the new instances to finish creating, but it doesn't undo the picked selection from the last spawn action. So, you need a system - Pick All Cards before you attempt to pick the ones with an index >= 0.
the "Pick All" is why the previous code you posted worked, where you looped through all instances.
here is a sample I did for someone last year, that flips cards, makes sure matches exits, shuffles, allows for different layouts, match 2,3 or 4 cards to remove them...
https://www.rieperts.com/games/forum/MemoryGame.capx