Fix to don't reload homepage when click into an anchor

Added the fix suggested into https://dev.plone.org/ticket/2988#comment:11