Remove unused $cfg->setTreeRootValue(null);.