Fix segfaults in the formatter.

Also: expletive deleted.
This code base makes too much use of macros.