Edited;
Quote: "Do you know whether the problem is number of functions or nesting level of functions or some awkward combination of the two?"
Unfortunately I cannot say... The compiler problem error occurs at different function counts and complexities. The danger arises even with no code in each function; but that does not mean that packing more code into less functions makes much difference, because the error will still occur but with a more constrained limit. In one project the error occured with approximately 2,000 functions, and in another project with more complex functions, the limit was approximately 1,800.
The problem takes place just after the compile process finishes, during the linking phase completes; that may be a good clue for anyone familiar with the compiler source code.
Quote: "The new procedural magic system. One of the most complex pieces of code I've ever written!"
Sounds like a nice game mechanic; I'll keep posted to see how it works in the game.