Fix vcs repo constructor, fixes #2444