I see the Problem. Never use "Waits", they are inefficient. Use "Add expiration timer to last created unit". Expiration timer is that a Unit kind of vanishes when the timer is over (I guess I dont have to explain an expiration timer further).
Your problem is, that during the wait another unit could be set as "last created unit".
Here is a further example: You spawn 2 units, 1 unit at game-time 5 sec, and one at 10 sec. When you call "Remove last created unit" at sec 7, unit 1 will be removed. BUT:
When you create a unit at sec 5 and 6 and you call "Remove last created unit" at sec 7, unit 2 will be removed.
You understand what I'm trying to tell you?