title: Duplicate declaration of same resource defined in separate classes
body: <p>I have a class definition which requires the <code>build-essential</code> package:</p>
  
  <pre><code>class erlang($version = '17.3') {
  
    package { "build-essential": 
      ensure =&gt; installed
    }
    ...
  }
  </code></pre>
  
  <p>Another class in a different module also requires the <code>build-essential</code> package:</p>
  
  <pre><code>class icu {
  
    package { "build-essential": 
      ensure =&gt; installed
    }
    ...
  }
  </code></pre>
  
  <p>However, when I try to perform puppet apply, the error I receive is:</p>
  
  <pre><code>Error: Duplicate declaration: Package[build-essential] is already declared in file /vagrant/modules/erlang/manifests/init.pp:18; cannot redeclare at /vagrant/modules/libicu/manifests/init.pp:17 on node vagrant-ubuntu-trusty-64.home
  </code></pre>
  
  <p>I was expecting classes to encapsulate the resources they use but this doesn't seem to be the case?  How can I resolve this clash?</p>