Bug fix for #2334.