It works, just your orange has an ID set to "3" in the layout editor. If you follow the JSON, it should be "1", and the yellow one should be "2" (the yellow one is 1 right now).
In event 6, the array size should be set to (0,1,1) so that it resets, or empties the array. Then the new values get pushed in. If it is (2,1,1) the way you have now, the first two entries will be 0 and then you'll add entries after that (basically you'll always have a red thing mixed into your stack).
Right now only two of the items out of the three used instances get destroyed, because only two instances get set as "Used" in event 16 and 17. To fix this is a bit trickier. You'll want to set the "Used" instance variable in the family "Items" instead of the sprite object "Item".
First delete the "Used" instance variable from "Item". Then add a new "Used" instance variable in the "Items" family, set to boolean. You can delete events 16 and 17 completely. In event 7, add the actions for "Items: Set Used to True" and "Item: Set Used to True", you'll need both. Then in event 8, after the function is called, set Items and Item Used to False. Finally in event 18 (formerly event 20, if you didn't delete 16 and 17 yet), add the compare boolean condition "Item is Used".