Fix panic in validate context for build Upstream-commit: 63ed18ad11a0ae563a3b75af4c6660e63667f896 Component: engine