Only set the "WE_HAVE_INSTRUCTIONS" composite flag if a glyph program is actually present
diff --git a/Lib/fontTools/ttLib/tables/_g_l_y_f.py b/Lib/fontTools/ttLib/tables/_g_l_y_f.py
index a6cd1fc..b3edaac 100644
--- a/Lib/fontTools/ttLib/tables/_g_l_y_f.py
+++ b/Lib/fontTools/ttLib/tables/_g_l_y_f.py
@@ -789,7 +789,8 @@
 		haveInstructions = 0
 		for i in range(len(self.components)):
 			if i == lastcomponent:
-				haveInstructions = hasattr(self, "program")
+				# Only set haveInstructions if the program is non-zero
+				haveInstructions = hasattr(self, "program") and self.program
 				more = 0
 			compo = self.components[i]
 			data = data + compo.compile(more, haveInstructions, glyfTable)