in case one sets a value twice (first time to >= 400, second time < 400) should  `failed` also be swapped from "failed=true" to "failed=false"?

or in case you don't want to support such thing, throw an exception in this case?