My not yet complete attempt at doing a Windows build produces several ofthese warnings during the build phase:
Hash %ENV missing the % in argument 1 of each() at -e line 1.
I believe the attached patch is the fix for that.