Some formating
Remove trailing whitespace
Expand tabs
Fix OpenType math cut-ins code

Don’t try to fetch sub/superscripts that are not of math_char type (e.g.
sub_box). This manifested in weird errors like the ones described here:

  http://tex.stackexchange.com/q/122923/729

Hopefully if fixes the issue in MiKTeX as well, I can’t test it.