Adapt to first,last from current SetRange(); fixes AliROOT.

(cherry picked from commit d2b569f314cb96943705f212cad8a4f7ac659aff)