Avoid startup loops and segfaults
There are two cases where we try to store a record before we're
ready for it - an initial printf() during init may call free(NULL)
and recurse, and a fork() doesn't completely reset the trace
before setting up the trace, so there's an API call that happens
when half-initialized.