This helps prevent potential segfaults due to null-pointer
dereferencing in the face of errors when the plugin is accessed via
multiple threads.
If multiple threads are pushing errors onto the error stack then its
possible for elements of the various string pointer arrays to be left
NULL, causing a segfault when the stack is printed.
Whilst this does nothing to address the "correctness" of the plugin in
a multi-threaded context, at least it shouldn't crash.
Error messages may still be corrupted.