Assertion failure
# Description:
```console
$ nix build github:nix-community/nurl/7f789ea2da9ff52724efb38df01ecda87704fc87
/usr/include/c++/13.2.1/bits/unique_ptr.h:453: typename std::add_lvalue_reference<_Tp>::type std::unique_ptr<_Tp, _Dp>::operator*() const [with _Tp = git_tree_entry; _Dp = nix::Deleter<git_tree_entry_free>; typename std::add_lvalue_reference<_Tp>::type = git_tree_entry&]: Assertion 'get() != pointer()' failed.
fish: Job 1, 'nix build github:nix-community/…' terminated by signal SIGABRT (Abort)
```
# Additional info:
* package version(s):
- nix 2.20.3-1
* config and/or log files:
- `/etc/nix/nix.conf`:
```
build-users-group = nixbld
auto-optimise-store = true
extra-platforms = aarch64-linux i686-linux
extra-experimental-features = auto-allocate-uids
auto-allocate-uids = true
```
- `~/.config/nix/nix.conf`:
```
experimental-features = nix-command flakes
max-jobs = auto
use-xdg-base-directories = true
warn-dirty = false
extra-nix-path = nixpkgs=flake:nixpkgs
```
* Backtrace:
[gdb.txt](/uploads/6e1c31530f4fab04d52694e4a14ac4b6/gdb.txt)
# Steps to reproduce:
1. `$ nix build github:nix-community/nurl/7f789ea2da9ff52724efb38df01ecda87704fc87`
Note that I was not able to reproduce this issue with the upstream version of nix, even on the same commit:
```console
$ nix run github:NixOS/nix/8a8172cd2b5ef2f6dd2d9673a6379447d780ff17 build github:nix-community/nurl/7f789ea2da9ff52724efb38df01ecda87704fc87
```
works just fine. That is why I am reporting this issue here.
issue