TRQ-2973 Thread protect the AVL_tree calls.