Fixes circular reference bug in custom generators

In order to fix this, `GeneratorListener` must have the container injected into it via a setter, instead of the `Registry` being injected into the constructor.