Fix possible race on container restart and restart error handling Upstream-commit: c1e019585773f92b3300070283701811980a64c7 Component: engine