merge FlagsAsBits and flagsFromBits to FlagsBits