well rats. I totally forgot about this issue, deployed today updating to 2.7 and broke my site. Switching the api back to 2.5 fixes everything, so it is definately the above issue.
I just can't figure out where to set the serverinfo. If i set it too early (when loading layers) i get a esri.id not defined or serverInfo is not a constructor.
If i set it too late, i get tokenservice not defined.
And I can't seem to find the sweet spot.