JGit ignored the references settings when reusing the repo.

- Expanded test to check for actual usage of references (i.e. no objects
in the cloned repo)
- applied a workaround for JGit behaviour