GTK module is not loaded within the snap

I am snapping autopilot-gtk in order to be able to introspect gnome snaps to add automated GUI tests. That snap generates a library ( that needs to be shared with the consumer snaps.
You can see the autopilot yaml here (1)

To share the library I am using the content interface. So I have in the autopilot snap the slot:
content: testability
interface: content
- usr/lib

And the consumer snap, in this example gedit (2), has the plugs:
interface: content
default-provider: autopilot-gtk:testability
target: snap/testability
And also I added this environment definitions:
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/lib/gedit:$SNAP/snap/testability
GTK_MODULES: $GTK_MODULES:$SNAP/snap/testability/

I install the snaps and connect the interfaces properly, but when I run the gedit snap I see this message:
Gtk-Message: Failed to load module “/snap/gedit/x1/snap/testability/”
That prevents me to introspect the snap.

I checked with “snap run --shell gedit” and the library is in the correct path (/snap/gedit/x1/snap/testability), also I checked the variable LD_LIBRARY_PATH and it contains the path for that library: /snap/gedit/x1/snap/testability.

Am I missing something? Why does the snap fail to load that gtk-module if I can see it with snap run --shell …?