title: Graphviz Dot placing node inside subgraph even though it was defined elsewhere
body: <p>I am trying to make a dot script generator for a homework problem, it's going well except I have this issue where some nodes that are not defined in subgraphs are being placed in them. For example the following dot script:</p>
  
  <pre><code>digraph dg {
      compound=true;
      labelloc="t";
      label="test.cpp";
      Vehicle;
      Make;
      subgraph clusterFord {
          label="Ford"
          Ford[shape="none"][style="invis"][label=""];
          Mustang -&gt; Vehicle [label="private"];
          Thunderbird -&gt; Vehicle [label="private"];
      }
      Ford -&gt; Make [label="public"][ltail ="clusterFord"];
      subgraph clusterChevrolet {
          label="Chevrolet"
          Chevrolet[shape="none"][style="invis"][label=""];
          Camero -&gt; Vehicle [label="private"];
      }
      Chevrolet -&gt; Make [label="public"][ltail ="clusterChevrolet"];
  }
  </code></pre>
  
  <p>Generates this <a href="https://i.imgur.com/gUA3dYK.jpg" rel="nofollow noreferrer">image</a>: 
  <img src="https://i.stack.imgur.com/eYCgy.jpg" alt="enter image description here"></p>
  
  <p>The "Vehicle" node is supposed to be outside of the "Ford" subrgraph. What am I missing here?</p>