In looking at the error from T211052, I noticed that the error has the page title unescaped for the File namespace:
"wikibase-mediainfo" content is not allowed on page [[File:Foo.png]] in slot "⧼slot-name-main⧽"
This renders in wikitext poorly. :-) Instead, we'd want:
"wikibase-mediainfo" content is not allowed on page [[:File:Foo.png]] in slot "⧼slot-name-main⧽"