Make sense, at least, provided error is pointing to that.
But, when I look at a content of my www folder, the head tag is not self-closed at any point. Furthermore, an application is working in Windows environment. I'm seeing this error only in Ubuntu.
Though I think I may have an idea. My Ubuntu based Apache uses Google Speed Mod plugin which, among other things, auto minifies everything. Maybe that is the cause of this problem.
After some testing I can confirm the problem was in Google mod_pagespeed plugin.
PS. Thanks @brandyshea you indirectly helped me brainstorm this problem