update-desktop-database adds MimeType entries to mimeinfo.cache even from .desktop files that have "Hidden=true". The desktop file spec says Hidden is "strictly equivalent to the .desktop file not existing at all...". So such .desktop files should be ignored when generating mimeinfo.cache.
Fixed in git.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.