Defend against not having a last error

Apparently this happens every so often in libgit2, and we need to handle it.