Streaming levels freezes the game

An update on this. I attempted to separate the load and visibility settings into separate functions. Unfortunately I discovered that the freeze occurs at the setting of the loaded option. Toggling the visibility doesn’t seem to have any major impact. However I discovered if you toggle too many visibility options completely without unloading them first, the engine crashes.