getBBox() bug in Firefox

HTML

<svg id="aa">
    <g id="visible"><rect />
        <rect fill="#000" width="180" height="100"></rect>
    </g>
    <g id="hidden" display="none">
        <rect fill="#f00" width="150
          
     
          
        " height="100"></rect>
    </g>
</svg>

JavaScript

var w;

w = document.getElementById('aa').getBBox();
console.log(w);


// Chrome reports 0.
// Firefox dies with a DOM exception.
// NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMSVGLocatable.getBBox]

w = document.getElementById('hidden').getBBox().width;
console.log('hidden: ' + w);