I seemingly wrote this maintenance script back in August 2013, but based on some investigation in T184318#3879868, there are 3.5M accounts that don't have a "home wiki" set...
I seemingly did run it in August 2013, https://wikitech.wikimedia.org/wiki/Server_admin_log/Archive_23#August_21 but there's definitely some rows that seem to need updating still