There seems to be a problem with sitelinks after certain item mergers at Wikidata. Scenario: item A with sitelink "foo" is merged into item B with sitelink "bar". The corrupted post-merge situation is described as followed:
* "foo" and "bar" appear in the merged item (Web UI, also JSON representation and so on)
* "foo" does *not* appear in WDQS as a sitelink of any item, but "bar" does
* "foo" does *not* appear in Wikidata's `wb_item_per_site` table, but "bar" does
* "foo" does *not* appear in the local `page_props` table
* page "foo" appears locally unconnected, and it can indeed be connected to another item than the merge target
* page "bar" does see "foo" locally as an interwikilink
The sitelink situation seems pretty corrupted. This has also been reported with specific examples at [[ https://www.wikidata.org/w/index.php?title=Wikidata:Contact_the_development_team&oldid=1045996541#Missing_sitelinks_after_merging | Wikidata:Contact the development team ]], including mentions of specific cases.