DRILL-1054: Handle return statement in function templates