crypto/shachain: detect if we're inserting a bogus hash.