Corrected bug as done in the trunk rev [5843]: stomate_rest_out.nc file was not closed correctly for some cases. It is strange that standard case was working.