title: Error in parse_block(g[-1], g[1], params.src): duplicate label 'unnamed-chunk-1
body: <p>There is something strange with this error. Sometimes the same rmd file with r chunks runs without problems and knitr assigns sequential number after the 'unnamed-chunk-' but sometimes knitr reports error.</p>
  
  <p>I can't find any way to identify under what circumstances the process runs smoothly and when it generates error. All r chunks within rmd file are without the name/label.</p>
  
  <p>Below there is the log of command in case everything is going smoothly and the not labels chunks are given sequential number</p>
  
  <pre><code>outfile = c(outfile, knit("File1.rmd"))    
  processing file: File1.Rmd
  
    |.....                                                            |   8%
    ordinary text without R code
  
    |...........                                                      |  17%
  label: unnamed-chunk-1 (with options) 
  List of 1
   $ echo: logi FALSE
  
    |................                                                 |  25%
     inline R code fragments
  
    |......................                                           |  33%
  label: unnamed-chunk-2 (with options) 
  List of 4
   $ echo      : logi FALSE
   $ connection: symbol db.conn
   $ output.var: chr "db.data"
   $ engine    : chr "sql"
  
    |...........................                                      |  42%
    ordinary text without R code
  
    |................................                                 |  50%
  label: unnamed-chunk-3 (with options) 
  List of 1
   $ echo: logi FALSE
  
    |......................................                           |  58%
    ordinary text without R code
  
    |...........................................                      |  67%
  label: unnamed-chunk-4 (with options) 
  List of 1
   $ echo: logi FALSE
  
    |.................................................                |  75%
    ordinary text without R code
  
    |......................................................           |  83%
  label: unnamed-chunk-5 (with options) 
  List of 1
   $ echo: logi FALSE
  
    |............................................................     |  92%
    ordinary text without R code
  
    |.................................................................| 100%
  label: unnamed-chunk-6 (with options) 
  List of 1
   $ echo: logi FALSE
  
  
  output file: Test_DSN-ARAMIS-01.md
  
  &gt; outfile = c(outfile, knit_child("File2.Rmd"))
  
  
  processing file: File2.Rmd
    |.............                                                                                                                                          |   8%
    ordinary text without R code
  
    |.........................                                                                                                                              |  17%
  label: unnamed-chunk-1 (with options) 
  List of 1
   $ echo: logi FALSE
  
    |......................................                                                                                                                 |  25%
     inline R code fragments
  
    |..................................................                                                                                                     |  33%
  label: unnamed-chunk-2 (with options) 
  List of 4
   $ echo      : logi FALSE
   $ connection: symbol db.conn
   $ output.var: chr "db.data"
   $ engine    : chr "sql"
  
    |...............................................................                                                                                        |  42%
    ordinary text without R code
  
    |............................................................................                                                                           |  50%
  label: unnamed-chunk-3 (with options) 
  List of 1
   $ echo: logi FALSE
  
    |........................................................................................                                                               |  58%
    ordinary text without R code
  
    |.....................................................................................................                                                  |  67%
  label: unnamed-chunk-4 (with options) 
  List of 1
   $ echo: logi FALSE
  
    |.................................................................................................................                                      |  75%
    ordinary text without R code
  
    |..............................................................................................................................                         |  83%
  label: unnamed-chunk-5 (with options) 
  List of 1
   $ echo: logi FALSE
  
    |..........................................................................................................................................             |  92%
    ordinary text without R code
  
    |.......................................................................................................................................................| 100%
  label: unnamed-chunk-6 (with options) 
  List of 1
   $ echo: logi FALSE
  </code></pre>
  
  <p>and the second execution of the same files gives the following output when processing second file</p>
  
  <pre><code>&gt; outfile = c(outfile, knit_child("File2.Rmd"))
  
  
  processing file: File2.Rmd
  Error in parse_block(g[-1], g[1], params.src) : 
    duplicate label 'unnamed-chunk-1'
  </code></pre>