[1.9] Fix #13265 #13332: traversing methods with text nodes

Sizes - compared to 1.9-stable @ ac93559eb9f18fcaec95dfdc97358b1b85bfe234
```
    267692       (+95)  dist/jquery.js                                         
    138337        (+7)  dist/jquery.min.map                                    
     93057        (-1)  dist/jquery.min.js                                     
     32984        (-1)  dist/jquery.min.js.gz
```