fix Issue 9022 - IFTI should support enclosing type/scope deduction