Notwithstanding the provisions of this chapter a child otherwise eligible for aid shall not be denied such assistance where a relative as specified in the social security act is unavailable or refuses to accept custody and the juvenile court fails to enter an order removing the child from the custody of the parent, relative or guardian then having custody.