[Indic] Reorder Reph to before the Halant after Matras

Uniscribe doesn't do it, but we want to do as it gives the Reph the
opportunity to interact with the Matras.  Test with mangal for example.
Sequence: <0930,094d,0915,094b,094d>
In test suite already.
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 575880b..b0e8ade 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -582,6 +582,18 @@
     while (new_reph_pos > start && (FLAG (info[new_reph_pos].indic_position()) & (FLAG (POS_SMVD))))
       new_reph_pos--;
 
+    if (unlikely (info[new_reph_pos].indic_category() == OT_H)) {
+      /* *If* the Reph is to be ending up after a Matra,Halant sequence,
+       * position it before that Halant so it can interact with the Matra.
+       * However, if it's a plain Consonant,Halant we shouldn't do that.
+       */
+      for (unsigned int i = base + 1; i < new_reph_pos; i++)
+	if (info[i].indic_category() == OT_M) {
+	  /* Ok, got it. */
+	  new_reph_pos--;
+	}
+    }
+
     /* Move */
     hb_glyph_info_t reph = info[start];
     memmove (&info[start], &info[start + 1], (new_reph_pos - start) * sizeof (info[0]));