During a recent refactoring of `validated()`, a line was
removed, causing `result` to be left unchanged. This
caused time to be wasted continuing to try to validate when a
non-recoverable error had occurred, and also caused the wrong
reason to be logged in `add_bad()`.
Closes #5468
Merge branch '5468-fix-deadcode' into 'main'
See merge request isc-projects/bind9!10851