This reverts commit f0b2f695. The implementation is incorrect and breaks compiling local-exec programs.