Use the as_flags method instead of map