Computing height in an alternative way if we're unsure whether the element is hidden or not.