This fixes #7836.