set_flags_from_control: remove function