Speed up workspace merging.

Look only at non-empty datasets.
Should speed up work-space merging by a factor 10-100.