NodeTreeFactory fix circular dependency with FactoryIdToFactoryImpl by making a trait of the factory