My bad. I traced the problem to a char pointer where both the disks vw1__VirtualDeviceFileBackingInfo->filename was referring to the same variable - same diskname. The error esx gave makes total sense. Worked now once I fixed the char*.
Thanks,
./Siva.