fix($anchorScroll): don't scroll to top when initializing and location hash is empty

Closes #8848
Closes #9393