[subset] extract a method to flip off composite instruction flag
diff --git a/src/hb-subset-glyf.cc b/src/hb-subset-glyf.cc
index 0367666..9b36a00 100644
--- a/src/hb-subset-glyf.cc
+++ b/src/hb-subset-glyf.cc
@@ -136,6 +136,20 @@
   }
 }
 
+static bool _remove_composite_instruction_flag(char *glyf_prime, unsigned int length)
+{
+  /* remove WE_HAVE_INSTRUCTIONS from flags in dest */
+  OT::glyf::CompositeGlyphHeader::Iterator composite_it;
+  if (unlikely (!OT::glyf::CompositeGlyphHeader::get_iterator (glyf_prime, length, &composite_it))) return false;
+  const OT::glyf::CompositeGlyphHeader *glyph;
+  do {
+    glyph = composite_it.current;
+    OT::HBUINT16 *flags = const_cast<OT::HBUINT16 *> (&glyph->flags);
+    flags->set ( (uint16_t) *flags & ~OT::glyf::CompositeGlyphHeader::WE_HAVE_INSTRUCTIONS);
+  } while (composite_it.move_to_next());
+  return true;
+}
+
 static bool
 _write_glyf_and_loca_prime (hb_subset_plan_t              *plan,
 			    const OT::glyf::accelerator_t &glyf,
@@ -181,15 +195,7 @@
       /* if the instructions end at the end this was a composite glyph */
       if (instruction_end == end_offset)
       {
-        /* remove WE_HAVE_INSTRUCTIONS from flags in dest */
-        OT::glyf::CompositeGlyphHeader::Iterator composite_it;
-        if (unlikely (!OT::glyf::CompositeGlyphHeader::get_iterator (glyf_prime_data_next, length, &composite_it))) return false;
-        const OT::glyf::CompositeGlyphHeader *glyph;
-        do {
-          glyph = composite_it.current;
-          OT::HBUINT16 *flags = const_cast<OT::HBUINT16 *> (&glyph->flags);
-          flags->set ( (uint16_t) *flags & ~OT::glyf::CompositeGlyphHeader::WE_HAVE_INSTRUCTIONS);
-        } while (composite_it.move_to_next());
+        if (unlikely (!_remove_composite_instruction_flag (glyf_prime_data_next, length))) return false;
       }
       else
         /* zero instruction length, which is just before instruction_start */