More fixes to debug info.

In many places a compilation unit is expected but only a DIDescriptor is passed
to the builder. This can result in assertion errors.