This fixes #7789.