This fixes #7826.