Sync of https://github.com/pantsbuild/pants/commit/c60fd9cc08294ec70d11cb5da120433a2c5e2468