Always use the VarDecl's parent DC to map the type into context,
instead of the DC of the SILFunction, because the latter might
have the wrong generic signature.
Fixes <rdar://problem/30786168>.
and ensure that the DeclContext of the SILFunction is used when
mangling substituted archetypes found in inlined variable declarations
that have been reparented into the caller
<rdar://problem/28859432>