There are many social and environmental cues that could determine a child's future well-being. For example, it has been suggested that peers have a larger influence in many ways on a child's development than do parents (something that I read outside of class). In addition, something like the socioeconomic status of the family could have an influence on the child's general well-being growing up.
The development of secure attachment could rely on not only the mother, but other people that the child often comes into contact with. If the child is constantly frightened or abused, it is probably not likely to have secure attachment no matter what the mother does.