TRQ-2992. Fix a non-threadsafe function.

We just started calling parse_node_token() from a function called after startup
when multiple threads are executing, so I changed parse_node_token() to be
threadsafe.