zink: only emit each cap once
Here's a quick stab at cleaning up caps emission a tad.
This changes the order of the caps a bit, because we iterate over the caps in the end. Alternatively, we could just gate the cap emission in the existence and keep the same buffer around. I don't really have a big preference either way.