Moved nodename check into getChildNodename