Fix bug where a lock on the SYS table was not released when closing a session that contained a temp table with an LOB column.