Fix a bug that made LSM insert threads keep cursors open unnecessarily.