Produce error rather than assert when encountering a nested function.

Remove extra '\n' characters from error messages.

Dynamically allocate error message buffer.
2 files changed