This is the other half of the fix for bug #7189.