Fix issue were XML parser dropped head for layout with CRLF-endings