Nothing contained in this chapter deprives other courts of the right to determine the legal custody of children upon writs of habeas corpus or to determine the legal custody or guardianship of children when the legal custody or guardianship is incidental to the determination of causes pending in other courts. Such questions, however, may be certified by another court to the juvenile court for hearing, determination or recommendation.
§ 211.051, RSMo