[HB] More churning towards ChainContext lookups
diff --git a/src/hb-ot-layout-gsub-private.h b/src/hb-ot-layout-gsub-private.h
index c5834b0..1775c7c 100644
--- a/src/hb-ot-layout-gsub-private.h
+++ b/src/hb-ot-layout-gsub-private.h
@@ -49,7 +49,7 @@
   inline bool single_substitute (hb_codepoint_t &glyph_id) const {
 
     unsigned int index = (this+coverage) (glyph_id);
-    if (NOT_COVERED == index)
+    if (G_LIKELY (index == NOT_COVERED))
       return false;
 
     glyph_id += deltaGlyphID;
@@ -76,8 +76,10 @@
   inline bool single_substitute (hb_codepoint_t &glyph_id) const {
 
     unsigned int index = (this+coverage) (glyph_id);
+    if (G_LIKELY (index == NOT_COVERED))
+      return false;
 
-    if (index >= substitute.len)
+    if (G_UNLIKELY (index >= substitute.len))
       return false;
 
     glyph_id = substitute[index];
@@ -187,6 +189,9 @@
   inline bool substitute (LOOKUP_ARGS_DEF) const {
 
     unsigned int index = (this+coverage) (IN_CURGLYPH ());
+    if (G_LIKELY (index == NOT_COVERED))
+      return false;
+
     return (this+sequence[index]).substitute_sequence (LOOKUP_ARGS);
   }
 
@@ -238,6 +243,9 @@
     hb_codepoint_t glyph_id = IN_CURGLYPH ();
 
     unsigned int index = (this+coverage) (glyph_id);
+    if (G_LIKELY (index == NOT_COVERED))
+      return false;
+
     const AlternateSet &alt_set = this+alternateSet[index];
 
     if (HB_UNLIKELY (!alt_set.len))
@@ -421,6 +429,9 @@
 			  property &  LookupFlag::MarkAttachmentType);
 
     unsigned int index = (this+coverage) (glyph_id);
+    if (G_LIKELY (index == NOT_COVERED))
+      return false;
+
     const LigatureSet &lig_set = this+ligatureSet[index];
     return lig_set.substitute_ligature (LOOKUP_ARGS, first_is_mark);
   }