I'm now 90% certain that it's the embassies causing the crashes. I've removed the possibility to build them and didn't experience a crash since then, so I'll consider this a temporary fix. I'll commit this revision soon to get a stable version until I've figured out what's wrong exactly with embassies.