Fix race condition in CLI tests: diff was not acquiring a container lock Upstream-commit: a60537992710edce4095b987f6e19ad0aea34ffa Component: engine