I came across several file pages at Wikimedia Commons which didn't display in their categories for several years even though the categorization tag was correct.
File:Kamenné (Měděnec), Memorial of wictims of World War I, district Chomutov.JPG was uploaded on 2015-10-18T10:49:22 and categorized into Category:Chomutov_District. Even though the file page was edited six times (2015-10-18T11:17:17, 2015-10-18T12:15:46, 2015-10-18T13:29:04, 2016-07-04T01:55:10, 2016-11-18T04:43:48, 2016-11-25T20:36:11), the file was not visible in the category Category:Chomutov_District. Just the seventh edit (2017-08-31T11:32:25) caused the the file appeared in its category, even though the edit not changed the categorization tag.
Similar cause was the file File:Klášterec nad Ohří, kostel Nejsvětější Trojice a salla terrena.JPG in the category Category:Chomutov_District and File:Ústí nad Labem 2015.JPG in the category Category:Ústí nad Labem were not visible in their categories till today.
(I detected these cases because I have the root categories of Czech regions, districts and cities in my maintenance list to keep the categories cleaned.)
These cases awaken a suspicion that thousands of pages stay permanently hidden due to this failure of MediaWiki. We need a safeguard to prevent and detect such failures.