This fixes #8048.