Add a nice consistency check, which revealed substantial problems.