Update affix properly on scrollspy speedy scroll to top of page

Fix scrollspy.js so as affix is updated properly when user scrolls fast
to top of page.

A fix for issue #11310.