"(b) It is a defense to prosecution under this section that the actor was related to the child within the second degree by consanguinity or affinity, as determined under Chapter 573, Government Code."
Take a look at these:
http://www.statutes.legis.state.tx.u...73.htm#573.023
http://www.statutes.legis.state.tx.u...73.htm#573.024
And I will go ahead link you to another Texas Atty General's opinion as well that says that a 17 year old can be detained and returned back back to his/her's home:
https://www.oag.state.tx.us/opinions...pdf/jc0229.pdf

