In today's world there are several people who change their names. So would writing either their new or old name in death note kill them? When looked through shinigami eyes which name would you see?
Based on the wikia's description of the rules of Death note:
This note will not take effect unless the writer has the person's face in their mind when writing his/her name. Therefore, people sharing the same name will not be affected.
So even if the person's name is changed or not, the writer thinks of the person's face while writing and thus there is no confusion regarding old/new names. The guy/gal is just dead...