I've been trying to squash DIEs that get generated too late, and here are some minor fixes. First, I'm now caching CONST_DECL DIEs. No sense recreating them in late debug. Second, I've limited gen_generic_params_dies() to early dwarf. I don't think we get any additional location info or anything later. Last, and similarly as above, imported modules shouldn't need to be generated in late debug at all. I don't think they were, but no sense going through them as part of process_scope_var in late debug. Committed to branch. Aldy