Sync of https://github.com/pantsbuild/pants/commit/15ca074bdae0b56425987060b925bf1509a4df99