Support zero-length data items in LSM, reference #540.

replacing #966 -- we want to branch / merge against develop.