Fix set_if for non-numeric boolean values

fixes #8049