Fixing search scope of FormalParameter-s resolution for generic definitions/template instantiation. Argument propagation used to be broken and the encapsulatingDefinition for formal parameter resolution used to be null for templates, instead of the real parent composite (now used in the fix).