Fix potential SEGV when one connection is used by more than
two threads and temporary lobs are freed by GC.