This fixes #7987.  It was not a code problem, but a database problem.