Improved fix for bug#9264.