Fix concurrency problem in test that builds with --parallel.

+review REVIEW-5094