BIER: fix support for longer bit-string lengths

Change-Id: I2421197b76be58099e5f8ed5554410adff202109
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
diff --git a/test/vpp_object.py b/test/vpp_object.py
index a1cf42f..088cc39 100644
--- a/test/vpp_object.py
+++ b/test/vpp_object.py
@@ -66,18 +66,17 @@
             return
         logger.info("REG: Removing VPP configuration for registered objects")
         # remove the config in reverse order as there might be dependencies
+        failed = []
         for obj in reversed(self._object_registry):
             if obj.query_vpp_config():
                 logger.info("REG: Removing configuration for %s" % obj)
                 obj.remove_vpp_config()
+                if obj.query_vpp_config():
+                    failed.append(obj)
             else:
                 logger.info(
                     "REG: Skipping removal for %s, configuration not present" %
                     obj)
-        failed = []
-        for obj in self._object_registry:
-            if obj.query_vpp_config():
-                failed.append(obj)
         self.unregister_all(logger)
         if failed:
             logger.error("REG: Couldn't remove configuration for object(s):")