Allow templates to be returned from lambdas