I could test this better tomorrow - the input/output is clearly different if you use for example Mimetex vs LiveTex
Mimetex (cgi) does render them correct
how about filter here in moodle.org - almost correct (teTeX and TeX filter):
$$\tiny X \scriptsize X \footnotesize X \small X \normalsize X \large X \Large X \LARGE X \huge X \Huge X$$