It was an incredibly difficult ruling, but I think it was the right one. It was a terrible mix-up and would be beyond horrendous for anyone involved, but it was still early enough to put it right. It's not the same as taking a five or ten year-old child away from the only parents it has ever known; a child of that age won't remember.
Like Bounty said, it's only a drama, but I do think it's been brilliantly acted. I felt terribly sorry for the couple who thought they were the parents, even though I'm not keen on the characters per se.