Changed the way the check for extension method is done when deciding if expression tree should be generated.