Fix race condition on container stop Upstream-commit: f5d33118394464e52eb29c781c1a8bb9345778c8 Component: engine