I don't think the aggregate emitter needs to emit anything when handling a constant expression which has an unused result. The unused result means we have nowhere to store the value anyway during codegen, so this early returns in that case.
This addresses PR51484.