title: inconsistency in 'ng build' vs 'ng build --prod'
body: <p>I am working on an angular app.</p>
  
  <p>Using</p>
  
  <ul>
  <li>Angular <strong>5.2.5</strong></li>
  <li>Angular CLI <strong>1.6.8</strong></li>
  </ul>
  
  <p>When I executed command</p>
  
  <pre><code>ng build
  </code></pre>
  
  <p>I did not get any error, but when I tried production build</p>
  
  <pre><code>ng build --prod
  </code></pre>
  
  <p>I got error</p>
  
  <blockquote>
    <p><strong>Property 'someProperty' is private and only accessible within class 'SomeComponent'</strong>.</p>
  </blockquote>
  
  <p>Reported error was correct, and I fixed it.</p>
  
  <p>The question is <strong>Why dev build did not report this?</strong>.
  <strong>Is that a defect in angular-cli</strong> OR am I missing something?</p>
  
  <p>Thanks</p>