Gateway messages lost when restarting scripts

I think this is essentially the same issue reported here, in which case we do have a ticket for this now. I don’t think there is a workaround.