IE throws error if getBoundingClientRect is called on node that is not in DOM