The next piece of 98531 is that in some cases we need to create a
cleanup function to do the work (when the object is an array, or we're
using regular atexit). We were not pushing that function's decl
anywhere (not giving it a context) so streaming it failed.
This is a partial fix. You'll notice we're naming these from a per-TU
counter. I've captured that in PR98893.