[mms] Catch invalid characters in user-defined flag names (Bug #12335).