Fix parent merge detection.