Fix bugs in BaseTree.insertChild
Use WeakHashMap for ErrorManager Thread->value maps; make static init fields final