Really fixes to class flags now.
Merge branch 'class-flags' into mit-prod