Fix #548: Calculate row indexes correctly in an OnDemandList when scrolling.