Fix for #8817.