Cb-7904: Pull request for nightlys

Would make more sense to put this where you modify newPath. You should also be checking against isInForEachRepoFunction