I notice that spTrackEntry also keeps track of lastTime
.
Not sure if it's the cause, but you may need to set that to the same value as time
. I'm not sure where it might be initialized as 0 if it is at all, but it'll likely fire multiple events (if you have any) if you don't set it to the same time.
Downside to that workaround is that it won't apply attachment swaps (since those work like events now).