fix handling of RETURN expression in RETURNS tuple function