I tested nested css and javascript and got the correct mode for both in a php file. I looked at PHP mode and it does include htmlmixed, it does a lookup on the mode based on mimetype instead of name.

It looks like for every other case outside of HTMLUtils we send mode queries through Editor getModeForSelection(). 

I could add to TokenUtils the following:

```
function getModeAt(cm, pos /*{line,ch}*/) {
    var outerMode = cm.getMode();
    var innerModeData = CodeMirror.innerMode(outerMode, cm.getTokenAt(pos));
    
    if (innerModeData.mode.name === "xml") {
         return innerModeData.mode.configuration;
    }

    return innerModeData.mode.name;
}
```

Thoughts?