gi_repository_find_by_gtype is nondeterministic
This was never a problem until we had the platform-specific {GLib,Gio}{Unix,Win32} typelibs, but here goes...
gi_repository_find_by_gtype()
implements its lookup by iterating over a GHashTable. (https://gitlab.gnome.org/GNOME/glib/-/blob/0888d8d5f28c051960ac41c39fca78f6fbc9c29f/girepository/girepository.c#L879) The iteration order of GHashTable is not guaranteed to be consistent.
It used to be there was only one typelib that would match a particular GType, but now that we have GTypes duplicated between GLib/Gio and the platform-specific typelibs, this function may return either one of the two, and which one it is depends on which other typelibs have been imported. This leads to bugs like gjs#610 (closed) (which needs a separate fix regardless, but this emergent behaviour surprised me...)