Check in a list of valid flags and assert that all flags are one of the listed.