OnDemandList: Fix flawed scroll-direction-detecting logic

When tree is used, its top preload node will also have a rowIndex of 0, so
this check wrongly assumed that it is above, even if it isn't.
We still check rowIndex first because it's cheaper than checking offsetTop.