Noted some failures. "Fixed" the code to do what I want it to do for the (no sanskrit stacking, tibetan stacking) case [which is exercised by this keyboard only].