Fix my previous fix by inserting a tempory link element.

Changing `location.hash` before scrolling fixes the browser history but breaks smooth scrolling. In order to fix both, we need to add a temporary fake link element.