Detect and remove prefix being added twice when going to pages already in history.