Make self.document always the root document