BTW, what do you think about the ExpandEnvironmentStrings() that
g_getenv() does? Is it actually necessary or not? I don't remember
the details of the case when I noticed environment variables with
references to other environment variables in them. It was a long time
ago, at work, on some NT 4 machines. It might well be that it was the
result of some broken local installation scripts or something, and
not anything common at all.
On the other hand, removing it might break something for somebody who
actually depends on this functionality.