Improve scroll restoration perf (bug 986625)