Fix for #6944.