; and (D) when the child is returned to the family from which the child was removed, or placed for adoption, with a legal guardian, or, if adoption or legal guardianship is determined not to be safe and appropriate for a child, in some other planned, permanent living arrangement, any amount in such savings account shall— (i) if the child has attained age 18, be transferred to the child