pg.GeneratorFactory.gens is currently (mis)used as a marker to determine whether a generator has been specified via pagegenerators options.
This approach is fragile and introduces implicit state coupling between command-line option handling and generator construction logic.
Problem
gens is not intended to represent configuration state.
Using it as a validation mechanism for generator presence is indirect and error-prone.
It can lead to incorrect assumptions depending on the order in which options are processed.
See T430093 as a sample.
Expected behavior
Generator presence should be tracked explicitly instead of being inferred from GeneratorFactory.gens or determined after getCombinedGenerator call
Proposed changes
Prevent pg.GeneratorFactory.gens from beeing used to vaildate that e generator was specified. Introduce an explicit mechanism to track generator selection state.