Even then, if the new domain has a different number of characters in it than the old one did, you can run against problems if any of the places you replaced the name happened to be inside a serialized array (almost all the options, including things like widget settings, text widget text, etc).