Fix lazy-updating SegmentTree bug.