Opening Statistics causes assert

When using Window > Statistics I get following assert:
Assertion failed: 0 [File:P:\apps\Unreal\UnrealEngine-4.27\Engine\Source\Runtime\RHI\Public\RHIShaderFormatDefinitions.inl] [Line: 86] Unknown EShaderPlatform 1!

Top of the call stack is as follows:
UE4Editor_Core!AssertFailedImplV() [P:\apps\Unreal\UnrealEngine-4.27\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [P:\apps\Unreal\UnrealEngine-4.27\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]
UE4Editor_StatsViewer!DispatchCheckVerify<void,<lambda_1e0be076a924495572ea7eb87d83a2ff> >() [P:\apps\Unreal\UnrealEngine-4.27\Engine\Source\Runtime\Core\Public\Misc\AssertionMacros.h:165]
UE4Editor_StatsViewer!FShaderCookerStats::Initialize() [P:\apps\Unreal\UnrealEngine-4.27\Engine\Source\Editor\StatsViewer\Private\StatsPages\ShaderCookerStatsPage.cpp:123]
UE4Editor_StatsViewer!FShaderCookerStatsPage::Generate() [P:\apps\Unreal\UnrealEngine-4.27\Engine\Source\Editor\StatsViewer\Private\StatsPages\ShaderCookerStatsPage.cpp:397]
UE4Editor_StatsViewer!SStatsViewer::Tick() [P:\apps\Unreal\UnrealEngine-4.27\Engine\Source\Editor\StatsViewer\Private\SStatsViewer.cpp:338]

If I check the code of FShaderCookerStats::Initialize it tries to loop from 0 to SP_NumPlatforms (49) to get all platform names. However this fails to the above assert as the ShaderPlatformToShaderFormatName doesn’t define platform names for EShaderPlatform that were deprecated in 4.27. The failure happens already in the EShaderPlatform::SP_OPENGL_SM4_REMOVED (value 1).