Define the $flags array before we use it.