cache: handle git-submodules in git-dependencies
Fix #1876