This is important when multiple threads are being used, and the trace environment is not set for a child thread