Even if not, does the xengallery_media_view template appear to be modified in your current style (red) or in a parent style (orange)?
Also, can you verify that you actually have XenForo Media Gallery 1.0.0 installed rather than Xen Media Gallery 2.1.x? You're certainly using the XFMG files, but this could happen if the XML hasn't imported properly, yet.
The code was not present in any template.
I did another upgrade of the xml. This time directly uploading it into the addon installer. Now the error is gone.
Thanks for your swift support.