Fix handling of empty $uids argument in change_flag()