MBS-6595: macro-ize flag class creation