Social workers have changed their mind about whether a young girl is at risk living with her aunt, months after they rushed through a report saying she was not.
A court is now deciding who should have full time custody - the aunt, the father, or another relative whom she is living with now.
The shortcomings of the safety report by Oranga Tamariki about a young girl have been revealed in the Masterton Family Court.
A social worker in February reported to a judge the girl was safe with her aunt.
But the same social worker has now told the court there were concerns, and these had a lot to do with the girl being coached by the aunt to make accusations against her father.
Judge Catriona Doyle expressed frustration that so much "time has been lost".
The socal worker rushed the report through in 48 hours in February, only after a judge summonsed the Wairarapa branch manager to court to explain the months in delays in doing the safety report.
That first report found no safety concerns with the aunt's care.
However, a second safety report finished on Monday, a day before the three-day Family Court hearing began, said Oranga Tamariki was concerned for the child's "emotional wellbeing" in the aunt's care.
The social worker told the court there were two concerns: the aunt did not understanding that the girl's relationship with her father was important.
The court had ordered supervised access for him after the aunt got a temporary parenting order in September, but he has had just a handful of visits with his daughter since.
The second concern was about the "coaching".
The court heard that police believed the aunt coached the girl to talk about her father engaging in sexual behaviour in front of her.
"She wanted to practice with me, practise three times so I don't get muddled up," the girl told police in an evidential video interview in March 2018.
Detective Sergeant Matthew Wasson told the court: "It became very apparent to my team and I that effectively [the girl] had been coached prior to the interview ... which creates some difficulties because obviously then it becomes not necessarily [the girl's] words but words that she had been taught to repeat."
Police abandoned their investigation of the father after that.
They and Oranga Tamariki both said they had earlier advised the aunt not to talk to her niece about the issues.
Judge Catriona Doyle asked the social worker why it had taken until one day before the hearing this week for Oranga Tamariki to come up with information the court asked for last October.
"It seems to me like all that information has been with the ministry for years," the judge said.
The social worker told the court it was only after her first report in February that more disclosures led to the evidential video interview, and the problem of the girl being coached arose.
Police still wanted to talk to the father, Mr Wasson said, but it was more about parenting styles, and there would be no charges.
Since February, the girl had been removed from the aunt at the order of the court and was living with another relative.
Yet Oranga Tamariki, when RNZ first asked it in February about the long delay in the production of the safety report said: "A protective aunt already had an interim parenting order and the child was safe with her.
"It [the case] does not relate to a care and protection matter, where safety was a concern," regional manager Grant Bennett said.
But this was said by Mr Bennett before his agency had actually done a safety assessment of either the aunt or the father.
The child's lawyer complained that Mr Bennett's statement was misleading because safety was an issue.
In court this week, the social worker said that from previous assessments up until mid-2017, "the ministry have always been confident and left [the girl] in [her father's] care".
RNZ has requested the judge make available her final ruling on who the girl should live with.