More properly handle changes in localname.