This fixes #7717.