DebugInfo: Avoid unnecessarily looking up the context when the declaration is already built.

No functional change intended.