Fix a bug that happens with git submodules in some cases

Fixes #7