Crash on PDF or SVG export in documents containing clones
<!--
See our full bug reporting guidelines at https://inkscape.org/contribute/report-bugs/
Writing a good bug report will ensure we'll be able to help efficiently. 🙂
-->
#### Summary:
<!-- Summarize the issue/suggestion concisely: -->
Under specific conditions (described below), trying to export a selected path as PDF or SVG (either Inkscape or Plain) results in a crash.
#### Steps to reproduce:
<!-- Describe what you did (step-by-step) so we can reproduce: -->
- Create a new file
- Create a new path, say path1 (a single line segment works)
- Clone path1
- Create a new path (say path2)
- Select path2
- In the Export > Selection dialog, select *.pdf or *.svg (either Inkscape SVG or Plain SVG) and try exporting
#### What happened?
Inkscape crashes and produces no exported file (see below for backtrace)
#### What should have happened?
Inkscape correctly exports a PDF or SVG without crashing.
Sample attachments:
[minimal_example.svg](/uploads/8303001498721615eb570d2fee433a09/minimal_example.svg)
<!-- Attach the sample file(s) highlighting the issue, if appropriate. -->
#### Version info
<!--
Open 'Help > About' and click on the little bug icon in the bottom right corner that copies the debug information to your clipboard. For command line users, run 'inkscape --debug-info'.
For Inkscape 1.0.2 and older, please manually add the Inkscape Version and Operating System Version. The Inkscape version is listed in the About dialog. For command line users, run 'inkscape -V'
Paste the information in the empty space between the apostrophes below:
-->
Backtrace and version info:
```
<pre>
0# Inkscape::Application::crash_handler(int) in /usr/bin/../lib/x86_64-linux-gnu/inkscape/libinkscape_base.so.1.3.0.0
1# 0x00007F5936D40090 in /lib/x86_64-linux-gnu/libc.so.6
2# 0x00005581EC733850
</pre>
<details><summary>System info</summary>
Inkscape 1.3 (1:1.3+202307231459+0e150ed6c4)
GLib version: 2.64.6
GTK version: 3.24.20
glibmm version: 2.64.2
gtkmm version: 3.24.2
libxml2 version: 2.9.10
libxslt version: 1.1.34
Cairo version: 1.16.0
Pango version: 1.44.7
HarfBuzz version: 2.6.4
OS version: Linux Mint 20.1
</details>
```
<!--
❤️ Thank you for filling in a new bug report, we appreciate the help! ❤️
Please be patient while we try to find the time to look into your issue.
Remember that Inkscape is developed by volunteers in their spare time, we'll try our best to respond to all reports.
-->
<!--
Please be careful when/after writing # for example in logs, code, or versions of linux
- use inline code span - single backticks (`) before and after it, like this - `#1618`
- use multi-line code block - triple backticks (```) to fence/enclose console logs
- attach long logs as a text file.
-->
issue