Whether flags contains the given flag.
bool hasFlag(SemanticsFlags flag) => (flags & flag.index) != 0;