Fix race conditions in parallel pull Upstream-commit: 262d57e387aabc50d35aa9969db618499ef9aca1 Component: engine