Move u32 cast into flag_type! macro