Fix for #7977.