Virtual sublevels in PIE when using Save/Load - how to prevent them from being created?

I’m trying to write a custom level streaming system. It worked well until I tried to add save/load subsystem.

Some pre-history: when I’m streaming level, I’m attaching all actors inside of it to some master actor, manually setting transforms. But after I added calls of Save/Load game to/from slot, I got an issue in Play In Editor mode - UE4 started to make a virtual copy of sublevel with name, like UEDPIE_0_OriginalLevelName and automatically saving all transforms in it, which I made to actors. When I exit PIE and run it again, instead of the original level, new level loads, and I’m getting the wrong original transforms, so my actors have a huge offset from the desired position.

Which is also strange, that I don’t even load any data from save game for test purposes. I just calling Save/Load game to/from slot methods. Maybe UE4, when it sees those methods, doing a copy of sublevels? If so, how can I disable such behavior, so only the original level will be loaded?

Also, if I try to open the original level when virtual levels exist, I’m getting editor crash with an error like: “World Memory Leaks: 1 leaks objects and packages. See The output above.”

After digging into engine code I found this line of code:

bool bShouldDuplicate = EditorLevelPackage && (BlockPolicy == AlwaysBlock || EditorLevelPackage->IsDirty() || !GEngine->PreferToStreamLevelsInPIE());

I tried to set PreferToStreamLevelsInPIE to true in Editor Settings first, but it didn’t help.

Then I started to look into what can cause IsDirty flag set to true.

In the end, the problem was in Save Game object variables - I saved some references to actors from sublevels inside of it, which it seems caused to change IsDirty flag. I removed those references and the editor stop making level duplicates on each save/load.