Handle group flags in getStateFlagIncludingParents().