Revert "Change PrimaryFlags to SecondaryFlags"

This reverts commit 4cce6cf9ca497c7f77a464e21a9ec423c48d112a.