Snap for 9898483 from e0843e47c2daaa7a103580b544a847e00ee67e58 to tm-qpr3-release

Change-Id: I04c8a2f9b6c75ec295c186d8aa526c00119254b3
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 7891024..ea17ca8 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -566,7 +566,7 @@
     face_index = FT_ABS( face_instance_index ) & 0xFFFF;
 
     /* value -(N+1) requests information on index N */
-    if ( face_instance_index < 0 )
+    if ( face_instance_index < 0 && face_index > 0 )
       face_index--;
 
     if ( face_index >= face->ttc_header.count )
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
index 5ee8dea..2da697d 100644
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -2086,7 +2086,7 @@
     /* Validate requested face index. */
     *num_faces = woff2.num_fonts;
     /* value -(N+1) requests information on index N */
-    if ( *face_instance_index < 0 )
+    if ( *face_instance_index < 0 && face_index > 0 )
       face_index--;
 
     if ( face_index >= woff2.num_fonts )