Since that bug was filed in 2012 and nothing has been done to fix it in 5 years and it is still unassigned, I think your workaround for poor user umask settings during sudo operations is probably a good idea.
FWIW, a robust "fix" in xdg-mime (a shell script) could be made by just moving the launch of "update-mime-database" to be before the user umask restore is done.
|