Fix potential deadlock and delayed notification

The hard limiter was checked before the value was set. That means, if
the user sets a valid outside the hard limit, he will not see an exception
(because we don't know yet if we are in hard limit) nor can he return to a valid
value later on (because we abort before we set anything).