I got an error and my guess is that it was because I delivered a cookie to a customer and it got trashed while was dragging it over. I think that would explain the missing index and I noticed that if you pick up a cookie and then realise that you made a mistake the cookie just goes to the spot it would have been if you never picked it up. Here are some screenshots:

Edit: I just watched your devlog and I can comfortably say, your design did wonders at simulating the annoyance of making new cookies every so often, as I was constantly overestimating my ability to go quick enough to make an order. Only for it to change as I was dragging it over to the customer and needing to make a new order, just for the customer to run out of patience. Fun game btw ;D