Programmatically changing the global site name?
What is the value for the site_name variable in the variables table? (e.g. what's the output of variable_get('site_name')?)

If it's overridden from the value that you set in your settings file, reset it like so:

variable_set('site_name', $my_title)