This fixes bug #7789.