The starting point of this bug report was this http://tex.stackexchange.com/questions/158679/siunitx-disturbs-spacing-of-in-math-with-xelatex.
Imho at the core is this problem:
~~~~
\documentclass{article}
\font\testa="Latin Modern Math:script=math;language=DFLT;"
\font\testb="Latin Modern Math:script=math;language=DFLT;" at 5pt
\begin{document}
$\hbox{}$%initialize math
\textbf{Standard Fonts}
$\Umathchar "0 "2 "61 $
.$\mskip20mu$.
\mbox{$\scriptscriptstyle \Umathchar "0 "2 "61 $}
.$\mskip20mu$. % OK
\medskip
\textbf{Open Type Fonts}
\textfont2=\testa
\scriptscriptfont 2= \testb
$\Umathchar "0 "2 "61$
.$\mskip20mu$.
\mbox{$\scriptscriptstyle \Umathchar "0 "2 "61 $} %math which uses fam2
.$\mskip20mu$. \qquad \textbf{To small!}
$A$ %some arbitrary math
.$\mskip20mu$. % now ok again
\end{document}
~~~~~
As one can see after the scriptscriptsize font has been used it mu-value is somehow "leaking" out and the next value of mu is wrong. It is only corrected at the next math. It only happens with open type fonts, "normal" math seems ok.
Anonymous
Thank you for the detailed bug report, Ulrike. I can confirm the problem. I will have a look at it, but probably not before next week.
As it took me over a year to get to this point and as I would probably hadn't thought about it anyway if someone in chat hadn't complained about unanswered questions, I think next week is quite ok ;-)
Darn it, I should have said “in two or three weeks” ;-)
... or six months. I’ve spent quite a lot of time on this bug so far, with little success, but will report when I do make progress.
Should be fixed by 9785737384bfe6080b8231f666ddf5b3861c957a, I think; please test.
I believe this is fixed; closing. Please re-open or file a new bug if there are still problems with this.