Fix warning in ec
Avoid mapping in the internal DeclId <-> entity map if DeclId is nullptr

This is the case when the information, e.g. about enums and constants,
comes from rootpcms.