Make the search for the digest method more general otherwise it blows up if the
digest method is in the signature element of a saml document.