substituteInPlace was invoked with multiple targets on the command line, which is not supported. (cherry picked from commit b21defaf) Re-applied due to bad merge in b116fa5f.