Fixed the identification of multiple data sets in the write() function.
Authored by: bugman 2008-09-24
Parent: [r7275]
Child: [r7277]