The editnotice API doesn't pass a title object when expanding user permission errors, causing things like {{ROOTPAGENAME}} to fall back on (incorrect) $wgTitle defaults. An example of this can be seen at https://en.wikipedia.org/w/api.php?action=visualeditor&paction=metadata&page=User:Vahurzpu/common.js&uselang=en&formatversion=2 (search for "Badtitle/dummy title for API calls set in api.php"
This seems to have been a case missed by T300184, which corrected most similar cases