Recursively define flags