Include function return type in scope tree