This was a regression from bug 133165 which I noticed while working on bug 480888, but wished to fix in a separate patch (despite that it would have been slightly easier to fix it in the same patch).