Store masks from flag object to prevent std::map

Previously a large % of the run time was spend in the std:: rb tree,
resolving symbol constants.

Now that each class has a single map (see
070731a13e0fb393a878943d4348b7ef1d9f7b7d) we store the mask for this map
statically to prevent any calls to the std::map object in Flags.