patch applied (cabal-branches/cabal-1.2): Improve error messages for failed sanity checks.