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