generator: Discard seen nodes early.