Fix IRGen for passing transparent unions

We have had a test for this for a long time with a FIXME saying what we
should be doing. This just does it.

Fixes PR21573.