Orphanages, as we all know from Charles Dickens, studies of kids from former Eastern Bloc countries and the musical Annie, are bad for children. Except, as a few studies are now beginning to find, when they’re not. The latest study looked at children from five not-so-wealthy countries in Asia and sub-Saharan Africa over the course of three years and found that being in an institution did not necessarily make them much worse off.

Whether or not orphanages are a viable solution for children with no homes is no small issue. According to the most recent figures from UNICEF, there were more than 132 million orphans in sub-Saharan Africa, Asia, Latin America and the Caribbean in 2005. That’s a scary number — more than the entire population of Britain and Italy combined — and figuring out the best way to look after that many vulnerable beings is a problem of significant complexity.

Even the definition of “orphan” is complicated. Not all of those 132 million-plus kids had lost both parents; closer to 13 million are what UNICEF calls “double orphans.” And 95% of all orphans, single or double, were over the age of five. So while the mental image of an orphan is of an abandoned baby in a basket, the reality is quite different.

There’s a reasonably heated debate over the best way to look after kids with no homes to go to. Studies out of Romania and Russia have found that kids raised in orphanages were vastly worse off than kids raised by foster families. A slew of studies suggest that children who were institutionalized as babies are much worse off than those who were not and that these effects remain through to adulthood.

But the new study, led by Kathryn Whetten, a Duke professor of public policy and director of the Center for Health Policy and Inequalities Research (CHPIR), and published by PLOSone, is the largest and most geographically and culturally diverse study of its kind. It followed 1,300 kids, aged six to 15 who were in institutions and 1,400 kids who were in family care in Cambodia, Ethiopia, India, Kenya and Tanzania. Researchers kept watch on such measures as the kids’ physical health, emotional difficulties, growth, learning ability and memory.

And it concluded that closing down all the orphanages — now sometimes known in more fancy circles as residential educational facilities — and finding other options for the 2 million kids currently living in such institutions would be a significant setback in addressing the issue.

“Our findings put less significance on the residential setting as a means to account for either positive or negative child well-being over time,” Whetten said. Much more important is the kind of country, neighborhood or community the child lives in, and, even more crucially, the kind of kid he or she is. Age, gender, existing emotional and nutritional status, and what kind of life each child has had so far have a lot more impact on that child’s fate than whether or not she or he was raised in a group setting.

Whetten, who first released similar findings from a different cross-sectional study in 2009, believes orphanages have been unfairly stigmatized by studies that have focused in on the dire institutions in Romania and Russia. Many of them rely on data from the Bucharest Early Intervention project, which tracks kids from the notoriously bad Romanian orphanages of the Ceausescu era. “This is reminiscent of what happened to mental health facilities in the U.S. in the 1980s,” she says. “We have taken findings from some of the most emotionally and socially deprived orphanages and are assuming that those outcomes would hold true for all group homes. An analogy that a colleague used yesterday was that it is like if we were evaluating whether to send our daughter to a summer camp and, to make our decision, we examined data from a girls prison camp.”

Indeed while Whetten’s study focused in on less wealthy countries, she believes there are implications for America, especially with the foster care system in such crisis. “In the U.S. there is a movement to see long-term residential care as detrimental to all children and that only when no other options are available do we place children in residential care and with the condition that they stay for as little time as possible,” she says. “Yet many of the residential centers here in the U.S. provide family-like care with long-term caregivers/parents who are continuously trained and supported in how to raise children who have experienced significant chaos and trauma in their lives. The children have family meals and can consider the children in the unit to be like siblings.”

While the study does not go so far as to recommend a whole-scale return to the practice of sending orphaned kids off to institutions, Whetten does think they should be one of a menu of solutions, and chosen when it suits the kid. “We need to evaluate each child individually to see where they will best thrive given the available options,” she says. “For example, if a child has four siblings and they would be broken apart if placed in families, but can stay together in a good group home, the group home may be best for all of them. All children deserve a loving family, and the family can look different depending on the situation.”

Contact us at letters@time.com.