Don't expand a variable with itself
If appending to variable like FOO=/usr:$FOO that is not defined by the environment we would replace $FOO with the definition of itself over and over endlessly. This made the whole system lag and eventually crashing KDevelop.