if rewrite == none implies that the risch_integrate has been called by integrate function which does not need a rewrite_complex flag to deal with the integral of the above listed functions. Therefore we an completely avoid  the if part and head towards the else for such cases.