title: CMD skips a line in batch file for no apparent reason, so what's the reason?
body: <p>Simply script, probably a simple question:</p>
  
  <pre><code>set /p customsettings="Some input prompt: "
  if /i %customsettings:~0,1% equ Y echo Some output
  </code></pre>
  
  <p>&nbsp;&nbsp;&nbsp;^-This works fine...</p>
  
  <pre><code>set custom=1
  if %custom% equ 1 (
      set /p customsettings="Some input prompt: "
      echo Some output
  )
  </code></pre>
  
  <p>&nbsp;&nbsp;&nbsp;^-...and this works fine.<br />
  So why doesn't this work fine?:</p>
  
  <pre><code>set custom=1
  if %custom% equ 1 (
      set /p customsettings="Some input prompt: "
      if /i %customsettings:~0,1% equ Y echo Some output
  )
  </code></pre>
  
  <p>The <code>set /p customsettings</code> line get skipped only when it is pinched between two if-statements.</p>
  
  <p>I'm curious why this happens, and how to fix it.</p>
  
  <p>Note: The problem still persists regardless of <code>EnableDelayedExpansion</code>'s setting.</p>