map keys not deleting correctly the second time running for each loop

Hi, I’m using a ‘‘selection’’ map (int / static mesh component ref) to delete the chips from my stack corresponding to that selection. The first time I run the operation it goes perfectly, the second time sometimes can cause issues and skips removing parts of my keys. I’m also running a for each loop on the remaining values of my stack so it sorts the keys starting from 1 in order to avoid unmatching key issues with my selection but still doesnt work. A reverse for each loop doesnt seem to be working to remove keys correctly either, so I have no ideas how I can do this. Thanks in advance to anyone who’s willing to help