Fix existing name being overwritten

Existing names were overwritten for instance when removing an item from
a menu page.