Fix removing containers on leaving from pending state Upstream-commit: f4de3f314e1e965056447d5ea6203ca4b66bb6e0 Component: engine