Compilation error when building from source

Trying to compile a freshly pulled version of the engine from the release branch, and this happens:

Build started at 16:06...
1>------ Build started: Project: UE5, Configuration: Development_Editor x64 ------
1>Using bundled DotNet SDK version: 6.0.302
1>Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -Target="UnrealEditor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild -architecture=x64
1>Log file: C:\Users\myusername\UnrealEngine\Engine\Programs\UnrealBuildTool\Log.txt
1>Using 'git status' to determine working set for adaptive non-unity build (C:\Users\myusername\UnrealEngine).
1>Building UnrealEditor and ShaderCompileWorker...
1>Using Visual Studio 2022 14.41.34120 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.41.34120) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>EXEC : warning : Visual Studio 2022 compiler is not a preferred version
1>Determining max actions to execute in parallel (24 physical cores, 32 logical cores)
1>  Executing up to 24 processes, one per physical core
1>Using Parallel executor to run 43 action(s)
1>------ Building 43 action(s) started ------
1>** For UnrealEditor-Win64-Development **
1>[1/43] Compile [x64] Module.DataprepLibraries.cpp
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2065: 'UDatasmithObjectTemplate': undeclared identifier
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2275: 'UDatasmithObjectTemplate': expected an expression instead of a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: prefix the qualified-id with 'typename' to indicate a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2923: 'TObjectPtr': 'UDatasmithObjectTemplate' is not a valid template type argument for parameter 'T'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: see declaration of 'UDatasmithObjectTemplate'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C3203: 'TObjectPtr': unspecialized class template can't be used as a template argument for template parameter 'InValueType', expected a real type
1>[2/43] Compile [x64] Module.DatasmithRuntime.cpp
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2065: 'UDatasmithObjectTemplate': undeclared identifier
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2275: 'UDatasmithObjectTemplate': expected an expression instead of a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: prefix the qualified-id with 'typename' to indicate a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2923: 'TObjectPtr': 'UDatasmithObjectTemplate' is not a valid template type argument for parameter 'T'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: see declaration of 'UDatasmithObjectTemplate'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C3203: 'TObjectPtr': unspecialized class template can't be used as a template argument for template parameter 'InValueType', expected a real type
1>[3/43] Compile [x64] Module.DMXRuntime.4.cpp
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2065: 'UDatasmithObjectTemplate': undeclared identifier
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2275: 'UDatasmithObjectTemplate': expected an expression instead of a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: prefix the qualified-id with 'typename' to indicate a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2923: 'TObjectPtr': 'UDatasmithObjectTemplate' is not a valid template type argument for parameter 'T'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: see declaration of 'UDatasmithObjectTemplate'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C3203: 'TObjectPtr': unspecialized class template can't be used as a template argument for template parameter 'InValueType', expected a real type
1>[4/43] Compile [x64] Module.UserToolBoxBasicCommand.cpp
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2065: 'UDatasmithObjectTemplate': undeclared identifier
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2275: 'UDatasmithObjectTemplate': expected an expression instead of a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: prefix the qualified-id with 'typename' to indicate a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2923: 'TObjectPtr': 'UDatasmithObjectTemplate' is not a valid template type argument for parameter 'T'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: see declaration of 'UDatasmithObjectTemplate'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C3203: 'TObjectPtr': unspecialized class template can't be used as a template argument for template parameter 'InValueType', expected a real type
1>[5/43] Compile [x64] Module.AvalancheViewport.cpp
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(244): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(1092): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(246) <call to TSharedPtr<IAvaViewportClient,1>::IsValid>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(1092): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(1113) <call to TSharedPtr<IAvaViewportClient,1>::IsValid>
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(251) <call to TSharedPtr<IAvaViewportClient,1>::operator->>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(258): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(263): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(265): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Containers\Array.h(389): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(266) <call to TArray<UE::Math::TVector2<float>,TSizedDefaultAllocator<32> >::TArray<UE::Math::TVector2<float>,TSizedDefaultAllocator<32> >>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Containers\Array.h(1957): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(267) <call to TArray<UE::Math::TVector2<float>,TSizedDefaultAllocator<32> >::SetNum>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(270): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(1092): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(1113) <call to TSharedPtr<IAvaViewportClient,1>::IsValid>
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(272) <call to TSharedPtr<IAvaViewportClient,1>::operator->>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\GenericPlatform\GenericPlatformMath.h(928): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(273) <call to FGenericPlatformMath::Min<double>>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(1092): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h(1113) <call to TSharedPtr<IAvaViewportClient,1>::IsValid>
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(276) <call to TSharedPtr<IAvaViewportClient,1>::operator->>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(278): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\GenericPlatform\GenericPlatformMath.h(928): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Math\UnrealMathUtility.h(593) <call to FGenericPlatformMath::Min<double>>
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Math\UnrealMathUtility.h(600) <call to FMath::Clamp<double>>
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Math\UnrealMathUtility.h(596) <call to FMath::Clamp>
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(279) <call to FMath::Clamp<float,double,float>>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(280): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(281): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(282): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Math\Box2D.h(298): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(284) <call to UE::Math::TBox2<float>::GetSize>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Math\Box2D.h(253): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(285) <call to UE::Math::TBox2<float>::GetCenter>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(288): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(289): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(291): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(296): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(48): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(298) <call to FAvaCameraZoomController::GetFOVPerStep>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\GenericPlatform\GenericPlatformMath.h(921): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(299) <call to FGenericPlatformMath::Max<double>>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(300): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Source\Runtime\Core\Public\Math\UnrealMathUtility.h(596): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(301) <call to FMath::Clamp<double,float,double>>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(48): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(303) <call to FAvaCameraZoomController::GetFOVPerStep>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(304): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(306): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(190): error C4702: unreachable code
1>   inlined at C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(308) <call to FAvaCameraZoomController::Reset>
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Experimental\Avalanche\Source\AvalancheViewport\Private\Interaction\AvaCameraZoomController.cpp(313): error C4702: unreachable code
1>   while compiling FAvaCameraZoomController::CenterOnBox
1>[6/43] Compile [x64] Module.DatasmithImporter.3.cpp
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2065: 'UDatasmithObjectTemplate': undeclared identifier
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2275: 'UDatasmithObjectTemplate': expected an expression instead of a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: prefix the qualified-id with 'typename' to indicate a type
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C2923: 'TObjectPtr': 'UDatasmithObjectTemplate' is not a valid template type argument for parameter 'T'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): note: see declaration of 'UDatasmithObjectTemplate'
1>C:\Users\myusername\UnrealEngine\Engine\Plugins\Enterprise\DatasmithContent\Source\DatasmithContent\Public\DatasmithAssetUserData.h(26): error C3203: 'TObjectPtr': unspecialized class template can't be used as a template argument for template parameter 'InValueType', expected a real type
1>Total time in Parallel executor: 6.49 seconds
1>Total execution time: 8.48 seconds
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat -Target="UnrealEditor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild -architecture=x64" exited with code 6.
1>Done building project "UE5.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 16:06 and took 09.291 seconds ==========