Can not Package because of Structures reference corruption

I get tons of these errors when I try to package my game. They seem to be all related to the buggy structure variables of UE4 which can get corrupted. What can I do about it to get my game packaged?

Everything compiles and plays fine in the editor, play as standalone works also fine. Any build setup I try does not.

I reported a lot about the buggy structure variables in the past but nothing got fixed in any new version. More on that here: Structure Variables get corrupted - Programming & Scripting - Unreal Engine Forums

See attached file for the whole log file

link text
[2018.01.02-16.55.30:468][ 0]LogProperty:Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/Menu/LevelSettings.LevelSettings_C:ExecuteUbergraph_LevelSettings.CallFunc_Array_Get_Item2’. Unknown structure.
[2018.01.02-16.55.30:469][ 0]LogProperty:Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/Menu/LevelSettings.LevelSettings_C:ExecuteUbergraph_LevelSettings.K2Node_MakeStruct_CurrentAllSettings’. Unknown structure.
[2018.01.02-16.55.30:470][ 0]LogProperty:Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/Menu/LevelSettings.LevelSettings_C:ExecuteUbergraph_LevelSettings.K2Node_MakeStruct_VisualsSettings’. Unknown structure.
[2018.01.02-16.55.30:470][ 0]LogProperty:Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/Menu/LevelSettings.LevelSettings_C:ExecuteUbergraph_LevelSettings.K2Node_MakeStruct_VisualsSettings2’. Unknown structure.
[2018.01.02-16.55.30:471][ 0]LogProperty:Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/Menu/LevelSettings.LevelSettings_C:ExecuteUbergraph_LevelSettings.K2Node_MakeStruct_VisualsSettings3’. Unknown structure.
[2018.01.02-16.55.30:472][ 0]LogProperty:Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/Menu/LevelSettings.LevelSettings_C:ExecuteUbergraph_LevelSettings.K2Node_MakeStruct_VisualsSettings4’. Unknown structure.
[2018.01.02-16.55.30:472][ 0]LogProperty:Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/Menu/LevelSettings.LevelSettings_C:ExecuteUbergraph_LevelSettings.K2Node_MakeStruct_VisualsSettings5’. Unknown structure.

Searched around, this is a bug that is known now 3 years! Here is a good thread on it: Unknown structure Error When Cook - Programming & Scripting - Unreal Engine Forums There are also post that date further away. Makes me wonder if anything has been fixed the last 3 years on structure variables. It is bug ridden mess and this particular issue should not be hard to fix.

To get rid of the errors you have to rename all the variables that are mentioned in the errors, problem are local function variables which are not shown by name in the log. Another way is to rename all the blueprints named in the errors and compile again. Before I did that I deleted my intermediate folder, maybe that is required too. Also, make sure to backup everything before, structures are fragile beasts and renaming could lead to new reference corruption or deletion of the data in the variables.