Instead of creating a new Go object each time Repository.Index()/Odb()
are called, return the same one as long as the underlying pointer
remains the same.
The library stores error information in thread-local storage, which
means we need to make sure that the Go runtime doesn't switch OS
threads between the time we call a function and th time we attempt to
retrieve the error information.