Fix error handling in LSM truncate implementation.

References #1100
Merge branch 'develop' into linear-search