Reading a VOTable with astropy does not get the table structure correct

I am using astropy.io.votable.tree.VOTableFile to create and write a VOTable for a python application. When I create the table it has the structure:

    <VOTABLE>
      <RESOURCE>
        <TABLE>
        ....
        </TABLE>
        <TABLE>
        ....
        </TABLE>
      </RESOURCE>
      <RESOURCE>
        <TABLE>
        ....
        </TABLE>
        <TABLE>
        ....
        </TABLE>
      </RESOURCE>
      <RESOURCE>
        <TABLE>
        ....
        </TABLE>
        <TABLE>
        ....
        </TABLE>
      </RESOURCE>
    </VOTABLE>

When I write it out to xml (with to_xml) I see this structure. However when I read in the table with astropy.io.votable.parse the structure I get is:

    <VOTABLE>
      <RESOURCE>
        <TABLE>
        ....
        </TABLE>
        <TABLE>
        ....
        </TABLE>
        <RESOURCE>
          <TABLE>
          ....
          </TABLE>
          <TABLE>
          ....
          </TABLE>
          <RESOURCE>
            <TABLE>
            ....
            </TABLE>
            <TABLE>
            ....
            </TABLE>
          </RESOURCE>
        </RESOURCE>
      </RESOURCE>
    </VOTABLE>

I verify this structure by writing out what I read in. This is obviously not what I intended. Is this a bug in astropy?