Don't reset global in TClass::New

Helgrind was complaining about a global being written without a lock.
In this case, the global is not actually changed so we do a check
to see if the old value was the same as the value we set and if
so, we don't bother to change it.