exportReferences: Check whether the path is in the input closure
exportReferences: Check whether the path is in the input closure

Fixes #2082.

shlevy/nix,pikajude/nix,NixOS/nix,layus/nix,dezgeg/nix,ehmry/nix,shlevy/nix,shlevy/nix,shlevy/nix,layus/nix,rycee/nix,layus/nix,peti/nix,dtzWill/nix,zimbatm/nix,peti/nix,zimbatm/nix,ehmry/nix,dezgeg/nix,dezgeg/nix,layus/nix,zimbatm/nix,dtzWill/nix,ehmry/nix,dezgeg/nix,rycee/nix,layus/nix,vcunat/nix,pikajude/nix,vcunat/nix,vcunat/nix,rycee/nix,dezgeg/nix,pikajude/nix,vcunat/nix,dtzWill/nix,dtzWill/nix,NixOS/nix,ehmry/nix,NixOS/nix,NixOS/nix,peti/nix,zimbatm/nix,peti/nix,ehmry/nix,dtzWill/nix,rycee/nix,shlevy/nix,peti/nix,ehmry/nix,rycee/nix,NixOS/nix