title: idea: too many module declarations found
body: <p>I want to create hello world java 9 application and start it in intellij idea.</p>
  
  <p>Now I have following structure:<br>
  <a href="https://i.stack.imgur.com/B4lNZ.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/B4lNZ.jpg" alt="enter image description here"></a></p>
  
  <p>content of inner module-info.java:</p>
  
  <pre><code>module my.module.Second {
      requires my.module.First;
  }
  </code></pre>
  
  <p>content of outer module-info.java:</p>
  
  <pre><code>module my.module.First {
      exports my.pack;
  }
  </code></pre>
  
  <p>But idea complains about my project:</p>
  
  <pre><code>Error:(1, 1) java: too many module declarations found
  </code></pre>
  
  <p>I don't understand why it happens and what really wrong. So  </p>
  
  <h2>Question:</h2>
  
  <p>My question is how to force idea to accept my hello world.</p>
  
  <p><strong>P.S.</strong>
  From the first glance error looks obvious but I have project which I downloaded from github with the same structure but it works properly and idea doesn't complain about it:</p>
  
  <p><a href="https://i.stack.imgur.com/EWcWC.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/EWcWC.jpg" alt="enter image description here"></a></p>