Setting location.hash to the same value twice in a row causes Safari to reload the page. Tested in Safari 1.1-1.2 and equivalent OmniWeb versions.
Don't set location.href to the same value twice in a row. If needed, set it to an intermediate value in between.