I guess I found my answer. Here are the limitations of S-functions + Model reference: http://www.mathworks.se/help/simulink/ug/using-s-functions-with-model-referencing.html#bsp24qn-6
A referenced model cannot use noninlined S-functions in the following cases:
- The model uses a variable-step solver.
- Simulink Coder™ generated the S-function.
- The S-function supports use of fixed-point numbers as inputs, outputs, or parameters.
- The model is referenced more than once in the model reference hierarchy. To work around this limitation, use Normal mode.
- The S-function uses string parameters.