Emit more entities in a deterministic order, and do so unconditionally

The cost of doing so is small, and not enough to justify the burden of
maintaining two code paths, in my opinion. By emitting in a deterministic
order, we can check (and indeed, I have checked) the correctness of a
self-hosted build by comparing the second and third stages.