Layers are not listed on initial open on the dialog
#### Original report
When opening an existing SVG with multiple layers, the layers are not listed in layers view.
Selecting objects that are definitely in layers (not the 'main page/layer) doesn't help.
However, they show up when I click on 'Add new layer'.
##### Minimal steps to replicate
1. Open Inkscape (with a fresh config folder)
1. Open F&S dialog and Align & Distribute dialog
1. Restart Inkscape
1. Open the Layers dialog
#### What happened?
The dialog is blank (it should list a single layer. If you open inkscape with a file, those objects will also be missing).
It shows up when clicking a button in the Layers dialog, or resizing the window, or switching windows.
#### What should have happened?
The dialog is not blank, lists the objects and/or layers in the file.
#### Version Info
Inkscape 1.2 (1:1.2.1+202207142221+cd75a1ee6d)
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: Ubuntu 20.04.4 LTS
issue