Properly clear environment variables.

Avoid secondary building last rule.