As far as refcounting is concerned, invisibles are like windows: you have to destroy them.
This makes the file chooser pass this test
The test case uses a weak ref to assert objects can finalize, and then spins the main loop shortly after finalizing to assert that the finalized object did not leak GSources into the main context causing latent crashes.