Talking about this and this.
The solution I tried was actually just bad code. I switched into a different environment and it gave me a nice error, which basically occurred because the code was bad. I tried also the older version and it gave me another error, which was basically the complete opposite of the error I got with new version. Old version gives an error complaining how there are too many "exception handlers" and that it should be turned into smaller parts. New version gives an error how the blocks nest too deeply and the solution is to reduce the amount of these.
Considering this is a dialog system, which can't be optimized any better at this point (without redoing everything in the game), the only solution is to go with the same kind of system I use in item and enemy creation. Basically I split all the "add to collection" methods into functions containing a few thousand of them. The new version actually has pretty good basis for doing this and still having it create only the necessary dialogs.
I think I did try that before but maybe this time I'll do better.