I might be losing my mind here haha. I added some logs to track what was happening in the console, and it does show the item getting overwritten:
FInding Slot: 0
runtime.js:14 Inventory {"c2array":true,"size":[10,1,1],"data":[[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]]]}
runtime.js:14 Inventory {"c2array":true,"size":[10,1,1],"data":[[["key"]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]]]}
runtime.js:14 FInding Slot: 1
runtime.js:14 Inventory {"c2array":true,"size":[10,1,1],"data":[[["key"]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]]]}
runtime.js:14 Inventory {"c2array":true,"size":[10,1,1],"data":[[["ball"]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]],[[""]]]}
But it also shows that it's working properly outside of that? It does everything right and then the second item overwrites the first every time. Here is updated code that I put in an isolated event sheet, testing on an isolated layout.