I have found a solution for this.
dlinmod sets some models parameters before computing the linearization and those parameters cannot be changed while the model is compiled : you juste have to set those parameters before compiling. Thus, the set_param wont raise an error if the parameter to set is already set to the same value.
set_param(model,'AnalyticLinearization','on');
set_param(model,'BufferReuse','off');
set_param(model,'SimulationMode','normal');
set_param(model,'RTWInlineParameters','on');
set_param(model,'InitInArrayFormatMsg','None');
feval(model,[],[],[],'lincompile');
for i = 1:numel(x)
out = linmod(model,x{i},u{i});
end
feval(model,[],[],[],'term');