There's a few ways to keep the ghosting items issue to a minimum. First is to allow sufficient time between your drags'n'drops. In your example, we've found that %wait1 should be 10 and %wait2 should be 20. It's a bit slow, but I guarantee you'll have less ghosting issues and more stable scripts. Plus with those delays, you will crash the client WAAAAY less.
But even this wasn't enough for the heartwood quester that requires being able to run 24/7. So the best solution for the ghosting issue is to open whatever container you will be dragging from first. This takes a bit of time, but it basically solves the ghosting issue. Since we introduced pack/bag opening before dragging, I haven't ever seen the quester die from a ghosted item.
TM