Fix discovering collector as generator.