This is necessary for setting the intermediate output path to work correctly (cherry picked from commit ae0aa8ed24)
ae0aa8ed24