Fixed param_stop_index in write_segments

Caused too much data being masked at the end of a flight split,
especially low frequency parameters.