Rationalise parent IDs