Fix bug where wrong parent name is set when extending with a string