Fixed incorrect logic in SiteMapPathHelper.