Fix git location caching

- Fixes #1072