I'm using the multiple leave/join version, as it works.

But Slats did point out, you could accomplish this with a mapped key, so I thought I would share that.
If I was doing it from scratch, I'd go with the mapped key route, to empty the dynamic ATG's.

But... the longer version works, and if it's not broken, it doesn't need to be fixed.