fix model caching for M
fix model caching for M

AMICI-developer/AMICI,FFroehlich/AMICI,FFroehlich/AMICI,AMICI-developer/AMICI,AMICI-developer/AMICI,FFroehlich/AMICI,AMICI-developer/AMICI,FFroehlich/AMICI