title: Thymeleaf layout dialect and th:replace in head causes title to be blank
body: <p>I'm following this tutorial: <a href="http://www.thymeleaf.org/doc/layouts.html">http://www.thymeleaf.org/doc/layouts.html</a> (got to Thymeleaf Layout Dialect section).
  In there you can find an example:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
    &lt;!--/*  Each token will be replaced by their respective titles in the resulting page. */--&gt;
      &lt;title layout:title-pattern="$DECORATOR_TITLE - $CONTENT_TITLE"&gt;Task List&lt;/title&gt;
      ...
    &lt;/head&gt;
    &lt;body&gt;
      &lt;!--/* Standard layout can be mixed with Layout Dialect */--&gt;
      &lt;div th:replace="fragments/header :: header"&gt;
      ...
      &lt;/div&gt;
      &lt;div class="container"&gt;
        &lt;div layout:fragment="content"&gt;
        ...
        &lt;/div&gt;
        &lt;div th:replace="fragments/footer :: footer"&gt;&amp;copy; 2014 The Static Templates&lt;/div&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Footer and header are replaced by <code>th:replace</code> tag in above example, while <code>&lt;head&gt;</code> has <code>&lt;title&gt;</code> tag in layout file.</p>
  
  <p>Basically, I want to replace whole <code>&lt;head&gt;</code> tag with <code>th:replace</code>.
  Therefore, I have:</p>
  
  <p>My layout file:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head th:replace="/html/components/head :: head"&gt;
  &lt;/head&gt;
  &lt;body&gt;
       &lt;div layout:fragment="content"&gt;
       &lt;/div&gt;
  ...
       &lt;div th:replace="/html/components/footer :: footer" /&gt;
  &lt;/body&gt;
  &lt;html&gt;
  </code></pre>
  
  <p>My content file:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html layout:decorator="/html/layouts/layout"&gt;
  &lt;head&gt;
      &lt;title&gt;My content title&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
        &lt;div layout:fragment="content"&gt;
        ...
        &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And finally my /html/components/head.htm file:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"&gt;
  &lt;head th:fragment="head"&gt;
  &lt;meta charset="utf-8" /&gt;
  &lt;title layout:title-pattern="$CONTENT_TITLE"&gt;Layout Title should be replaced by Content Title!&lt;/title&gt;
  ...
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Content is alright. Footer and head are included (replaced) from files as expected but page title is blank!</p>
  
  <p>I get:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8" /&gt;
  &lt;title&gt;&lt;/title&gt;
  ...
  </code></pre>
  
  <p>What's wrong?</p>