Fix cmd and entrypoint handling in parser Upstream-commit: 08f1a91ccd39a880645d4dbe8a45173f17cf42fe Component: engine