Remerged the HG codebase from HG changeset 72a0738c2361.
In particular: fixed the mistype in the Trusted DB.