Some failure conditions implicitly fail by failing some other check.
But the error messages are more helpful if they say explicitly what
actually caused the failure, so add those as failure conditions and
errors.
https://github.com/bitcoin/bitcoin/pull/16542/commits/625534d7b1417da926f1ced600855ea818d6e01e
Depends on D6642
Partial backport of Core PR16542