AddDependency fix for updating existing dependencies instead of adding the again. Unit tests included