Fix bug with gen-deps target with dependency not in work library