This fixes #8012.