Load errors when opening the project

I’ve now managed to solve the problem.

The reason why map_editor.tscn was not loading properly was, as I said, another scene (gui.tscn).
The reason that was not loading correctly was that in an attached script I have a reference to another scene, options.tscn.
The root node of this scene also had a script attached, in which there was a reference to a static variable of the class MainMenu. I have no clue why this was a problem, but after moving the referenced variable to my Lib class (which I wanted to do anyway) the load errors disappeared for some reason.