Fail when flags value is invalid.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>