Fix error when switching from git to package dep
Do not re-add locked deps when switching from package to git dep