Add a new (unused for now) flag value implementation.

It supports region groups and fixes inconsistency issues.