Move expression tree composition code to FuncFactory.