SlateThemeManager startup issue and preprocessor ALLOW_THEMES is not disabling all code paths

We are seeing this message when starting the editor with 5.6.1

LogObj: Display: Attempting to load config data for Default__SlateThemeManager before the Class has been constructed/registered/linked (likely during module loading or early startup). This will result in the load silently failing and should be fixed.

We are running with

obj.PrematureConfigLoadErrorLevel=1|2

I wanted to disallow themes till the above issue is fixed. But when running with

#define ALLOW_THEMES 0

other code is breaking because it is missing the preprocessor check or am I missing something?

Eg. Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp


FPropertyEditorModule& PropertyEditorModule = FModuleManager::Get().GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
		PropertyEditorModule.RegisterCustomClassLayout("EditorStyleSettings", FOnGetDetailCustomizationInstance::CreateStatic(&FEditorStyleSettingsCustomization::MakeInstance));
		PropertyEditorModule.RegisterCustomPropertyTypeLayout("StyleColorList", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FStyleColorListCustomization::MakeInstance));

after fixing
#define ALLOW_THEMES 0

I still see the original log message. Now coming out of the next line, because it is accessing the USlateThemeManager as well - FStarshipCoreStyle::ResetToDefault()

#if ALLOW_THEMES
		USlateThemeManager::Get().LoadThemes();
#endif
		FStarshipCoreStyle::ResetToDefault();

I see in git history that you tried to fix it beginning of the year