# Problem with \setmathfont and siunitx

I have some problem with the following code.

\documentclass{minimal}
\usepackage{fontspec,luatextra,unicode-math}
\usepackage{icomma}
\sisetup{decimalsymbol=comma, detect-all}
\let\nbu\SI

\setmathfont[range={\mathscr,\mathbfscr},StylisticSet=0]{xits-math.otf}

\begin{document}
\nbu{7.8}{m} or $7,8 = \nbu{7.8}{m} = \mathscr{A}$ in math mode.\par
\end{document}


I don't want \itshape for the m. With the following code, the result is good, but I don't want to put the \setmathfont{} inside the document environment (but in sty file). How is it possible ?

\documentclass{minimal}
\usepackage{fontspec,luatextra,unicode-math}
\usepackage{icomma}
\sisetup{decimalsymbol=comma, detect-all}
\let\nbu\SI

\begin{document}
\setmathfont[range={\mathscr,\mathbfscr},StylisticSet=0]{xits-math.otf}
\nbu{7.8}{m} or $7,8 = \nbu{7.8}{m} = \mathscr{A}$ in math mode.\par
\end{document}


Thanks to all.

It seems that siunitx is missing some kind of "default" font for the cases except \mathscr and \mathscrbf:

\documentclass{minimal}
\usepackage{fontspec,luatextra,unicode-math}
\nbu{7.8}{m} or $7,8 = \nbu{7.8}{m} = \mathscr{A}$ in math mode.\par