Out of memory when building with DX11 disabled on Unity 4

Every time I build a certain scene I get one of two errors when it’s at the “building level” stage

This one is the most common:
99188-fatal-error.jpg

The other one is this
99189-checkdisallowallocation.png

I’ve narrowed the problem down to one specific GameObject with scripts attached that have a lot of serialized properties. I tried building a scene with only that GO and it failed. Tried selectively deleting the scripts on it and had some results. I can build extra scenes into the game that hold GOs with only part of the scripts and it works, but I need all of them on the original one.
Also, there were some textures that caused the error but I seem to have corrected that issue by reimporting them. I reimported all the assets referenced in the messed up scripts too, to no avail.

My first instinct was to split up the asset references into different scenes so that the sharedAssets files don’t get too big (what with the RAM limitations of Unity 4), since that is the way I had solved that error before. This time though the only thing that works is activating DirectX 11, weirdly enough.
The errors seem to have started after I had activated and deactivated DirectX 11 in the player settings. Reversing the few other things I did that might have caused it did nothing.

I also tried reinstalling Unity, reimporting all the assets, deleting the folders inside the Library folder of the project, and finally upgrading to Unity 2017, which solves that particular problem but creates a crazy amount of other problems with the project; perhaps the worst of which is the script compilation time which has increased tenfold.
Of course I could just release a game that requires DX11 but I could not think of a dumber reason to have to do that. Then again steam survey says only 2.56% of users don’t have a DX11 compatible GPU, so it might not be that bad.

Alright, I have a new theory:
There’s nothing wrong with my project and it has been teetering on the edge of fatal error before. Now DX11 might just be using less memory and that’s why it still works.

In the offending scene I have references to basically all assets in the game (procedural generation). From my understanding they all get loaded into memory when the scene is loaded and then get unloaded until they’re used. I might try putting some of my asset references into prefabs in the resources folder and load them at points in the game where they are needed.