Generated python code discards previous filedescriptor in gpt-table parsing
This issue was found when trying out the gpt partition parser from:
https://formats.kaitai.io/gpt_partition_table/python.html

The problematic code is:
```python
        @property
        def entries(self):
            if hasattr(self, '_m_entries'):
                return self._m_entries if hasattr(self, '_m_entries') else None
           io = self._root._io   # <----- initial assignment
            _pos = io.pos()
            io.seek((self.entries_start * self._root.sector_size))
            self._raw__m_entries = [None] * (self.entries_count)
            self._m_entries = [None] * (self.entries_count)
            for i in range(self.entries_count):
                self._raw__m_entries[i] = io.read_bytes(self.entries_size)
                io = KaitaiStream(BytesIO(self._raw__m_entries[i]))  # <------- here io object will be overwritten
                self._m_entries[i] = self._root.PartitionEntry(io, self, self._root)
            io.seek(_pos)
            return self._m_entries if hasattr(self, '_m_entries') else None
```

Comparing with generated perl code, https://formats.kaitai.io/gpt_partition_table/perl.html:
```perl
  sub entries {
      my ($self) = @_;
      return $self->{entries} if ($self->{entries});
      my $io = $self->_root()->_io();   # <------ initial assignment
      my $_pos = $io->pos();
      $io->seek(($self->entries_start() * $self->_root()->sector_size()));
      $self->{_raw_entries} = ();
      $self->{entries} = ();
      my $n_entries = $self->entries_count();
      for (my $i = 0; $i < $n_entries; $i++) {
          $self->{_raw_entries}[$i] = $io->read_bytes($self->entries_size());
          my $io__raw_entries = IO::KaitaiStruct::Stream->new($self->{_raw_entries}[$i]);
          $self->{entries}[$i] = GptPartitionTable::PartitionEntry->new($io__raw_entries, $self, $self->{_root});
      }
      $io->seek($_pos);
      return $self->{entries};
  }
```


The problem with generated python code is that the object io will be overwritten with a new value, in each iteration of the loop.
Only the first iteration of the loop will behave as intended, the parser will fail for the rest of the elements.