Fix missing WeakMap shim in TreeController