Added check to rewriteWebLearnHref that the href exists.