Issue 9022 - IFTI should support enclosing type/scope deduction

http://d.puremagic.com/issues/show_bug.cgi?id=9022