<div>The cmd /c processing was actioned before saving away the current</div><div>directory, resulting in endlocal failing for a batch program. This</div><div>highlights as a failure during cmd /c which does not occur if the</div>
<div>same batch program is run from a running cmd.exe</div><div><br></div><div>Note: No tests because once cmd.exe is running, the environment</div><div>is set up and spawning new cmd.exe processes just inherit the</div><div>
environment.</div><div><br></div><div>[Fixes bug 22715]</div>