Separate flag setting from value setting.