exclude: allow decoding Exclude containing ImplicitSha256DigestComponent

Change-Id: Ibd598adcd7a96740fe48f19cbb99e5a6e19fe121
Refs: #2629
diff --git a/src/exclude.cpp b/src/exclude.cpp
index b48d245..89d052d 100644
--- a/src/exclude.cpp
+++ b/src/exclude.cpp
@@ -120,10 +120,14 @@
 
   while (i != m_wire.elements_end())
     {
-      if (i->type() != tlv::NameComponent)
+      name::Component excludedComponent;
+      try {
+        excludedComponent = std::move(name::Component(*i));
+      }
+      catch (const name::Component::Error&) {
         throw Error("Incorrect format of Exclude filter");
+      }
 
-      name::Component excludedComponent(i->value(), i->value_size());
       ++i;
 
       if (i != m_wire.elements_end())