Correct generics for NodeFactory.