I would not use the <div> in the head, because it will generate invalid HTML.See this : /libs/wcm/foundation/components/page/page.htmlthis will have all the logic: <head data-sly-include="head.html"></head>
You are right, I wouldn't know now where to look. Except my previous recommendation on closing the resourceresolver.Here an article on how to debug sessions, maybe that helps.https://helpx.adobe.com/experience-manager/kb/AnalyzeUnclosedSessions.html