This fixes #7977.