Added required_flags() to Code. Also added some bitwise operations to
FlagSet to make this easier.