Problem with offset() in IE 7

Problem with offset() in IE 7

I just upgraded Jquery from 1.2.6 to 1.4.2. One this I noticed rightaway is that the offset function is behaving strangely in IE (working fine in  firefox).

I have this div that appears contextually on a mouse click. Because of the offset.top being calculated incorrectly the div always appeared above the location of the click( in a scrolled down position).

On closer inspection of the source code for the offset function, I found that
top  = box.top  + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop ) - clientTop

however evaluation of (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop ) 
returned zero in the case of IE even when scrolled all the way down.

Does anybody know what the error is?