Fix parent is merged check