generator.py: _is_correct_ident(): Simplified