def update_refstring(self, string):
        """Updates the refstring that represents the original string that
        the module was parsed from. Also updates any properties or attributes
        that are derived from the refstring."""
        self.refstring = string
        self._lines = []
        self._contains_index = None
        self.changed = True

        #The only other references that become out of date are the contains
        #and preamble attributes which are determined by the parsers.
        #Assuming we did everything right with the rt update, we should be
        #able to just use the new contains index to update those.
        icontains = self.contains_index
        ichar = self.charindex(icontains, 0)
        self.preamble = string[:ichar]
        self.contains = string[ichar + 9:]
Updates the refstring that represents the original string that
        the module was parsed from. Also updates any properties or attributes
        that are derived from the refstring.