Fix value= keeping invalid values

It was possible to have a constant with non-validating values by using
value=. Validation would run and raise an exception if invalid,
however it would still retain the new value.

The fix is to catch this case, restore the old value, and re-raise.

There is almost certainly a cleaner way of achieving this.