Adds ability to flatten image after build Upstream-commit: 22f3e43e9a35711bb63108f1714840a92a4b138e Component: engine