This is split off from #2970. Upstream-commit: 06a818616bfce86e90152aeaffaf9394a085c356 Component: engine