This allows you to run multiple concurrent terraform operations against different environments from the same source directory. Fixes #14447. Also removes some dead code which appears to do the same thing as the function I modified.