Fix multiple `COPY --from` in multistage builds Upstream-commit: 1daa10301acfe0742dd852dfb8603c48afdaa1ee Component: engine