A child is not an asset like a house that gets willed to whoever you choose. In these situations, a court and/or child services will protect the child's rights and well being, if there are no legal guardians. If the child's mother has died, you are still one of the two legal guardians. If your mother becomes the second, that doesn't mean you stop being a legal guardian. If your mother then dies, you are still a legal guardian. The two slots do not have to be filled, one is enough. If you are stripped from your parental rights, your mother adopts, then dies, then the court will decide. If she wills that you again become a legal guardian, that does not undo the stripping of your rights.
When my wife and I adopted our son, we were told that we needed to hire multiple attorneys. One to represent the birth mother. One to represent the child. One to represent the birth father. And one to represent us. When we adopted our daughter we needed even more. One for the child. One for the birth mother. One for us. And one for each of the three possible birth fathers! We were outnumbered! Since no agency was involved, the attorney fees, the home study and the court costs were our only expenses. And when it came time to file our income taxes we claimed the adoption tax credit and were reimbursed the entire amount. Both times. We were fortunate. Adoptions can be, and in most cases are much more expensive.