The issue can be noticed on a clean XWiki instance by following these steps:
- enable multilingual and add French to the list of supported langauges
- create a new page and put this code:
Surprisingly, the output is: xwiki:Sandbox.TestPage1(fr). The page name "fr" is treated as a locale. The issue is in UidStringEntityReferenceSerializer which is used to compute the cache key. The problem is that the locale is appended like any other reference component.