Fix for make -j race from #9531 injected by cleanup in b1a22518f0c687db.