I wonder if there's a way to avoid this. Perhaps we could bump the version of the gir whenever the SONAME changes, so that we would have e.g. GnomeDesktop-3.0.typelib for G3.6, but GnomeDesktop-3.8.typelib for G3.8. I'm not quite sure if that would help or not, as I'm not familiar with introspection stuff. The idea is 'encode' the SONAME in the gir too, so that we can a) have multiple versions installed simultaneously, and b) the right version is loaded to avoid cases like this.
Thoughts?