About MT, I am not sure if environment variables are MT safe at least in Windows. Perhaps SetEnv() would have to be MT protected.
Once again, that is not what I was addressing. The problem is that I would want to fix Environment to reflect changes by SetEnv, then everything would be fine.
Unfortunately with current intefrace it is not quite possible...