[Indic] Unbreak Tamil

Tamil has only about 150 failures now!
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index bbf5024..394e3f4 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -365,7 +365,23 @@
       has_reph = true;
     };
 
-    if (basic_mask_array[HALF])
+     enum base_position_t {
+       BASE_FIRST,
+       BASE_LAST
+     } base_pos;
+
+    switch ((hb_tag_t) buffer->props.script)
+    {
+      case HB_SCRIPT_KHMER:
+	base_pos = BASE_FIRST;
+	break;
+
+      default:
+	base_pos = BASE_LAST;
+	break;
+    }
+
+    if (base_pos == BASE_LAST)
     {
       /* -> starting from the end of the syllable, move backwards */
       unsigned int i = end;