Fix for the call to write_xy_header().
This is now independent of the number of data sets, and is called correctly.
Authored by: bugman 2010-02-19
Parent: [r10772]
Child: [r10774]