exportReferencesGraph: Fix support for non-top-level store paths
exportReferencesGraph: Fix support for non-top-level store paths

Fixes #3471.

NixOS/nix,rycee/nix,NixOS/nix,rycee/nix,NixOS/nix,NixOS/nix,NixOS/nix,rycee/nix,rycee/nix,rycee/nix