When I tried to change bhwiki's language code from bh to bho using an exported sites xml various things fell apart and the site_language field was empty AFAIR. Also the site identifiers were probably left in an invalid state. I didn't have time to investigate that further as I was busy fixing the live site.
Also it seems that the script is not (correctly) purging the sites memached. Maybe that is related to terbium (where I ran the scripts) being on Zend?