mod_setenv before mod_deflate is not a problem by itself.
You're very likely doing something questionable and wrong with setenv.
Continuing to do that questionable and wrong thing after mod_deflate handles the response might produce an invalid or broken HTTP response, which might be broken in subtle ways, such as causing invalid caching by proxies and incorrect results being returned to requests from *some* clients.
mod_setenv before mod_deflate is not a problem by itself.
You're very likely doing something questionable and wrong with setenv.
Continuing to do that questionable and wrong thing after mod_deflate handles the response might produce an invalid or broken HTTP response, which might be broken in subtle ways, such as causing invalid caching by proxies and incorrect results being returned to requests from *some* clients.