Workaround a GitPython bug that causes BadObject.

Bug here:
https://github.com/gitpython-developers/GitPython/issues/61