if (content.toLowerCase().startsWith("<link") || content.toLowerCase().startsWith("<style")) {
int scriptIndex = responseContent.toLowerCase().indexOf("<script");
if (scriptIndex > 0 && scriptIndex < insertIndex) {
insertIndex = scriptIndex;
}
}
response.setContent(ERXStringUtilities.insertString(responseContent, content, insertIndex));
inserted = true;
So, because my first (and only script) in the head is inside the if IE conditional comment I believe that is why the stylesheet is being put in there.