diff --git a/django/contrib/gis/gdal/feature.py b/django/contrib/gis/gdal/feature.py
index 47fd9e5..d08e786 100644
--- a/django/contrib/gis/gdal/feature.py
+++ b/django/contrib/gis/gdal/feature.py
@@ -15,12 +15,13 @@ class Feature(GDALBase):
     "A class that wraps an OGR Feature, needs to be instantiated from a Layer object."
 
     #### Python 'magic' routines ####
-    def __init__(self, feat, fdefn):
+    def __init__(self, feat, fdefn, layer):
         "Initializes on the pointers for the feature and the layer definition."
         if not feat or not fdefn:
             raise OGRException('Cannot create OGR Feature, invalid pointer given.')
         self.ptr = feat
         self._fdefn = fdefn
+        self._layer = layer
 
     def __del__(self):
         "Releases a reference to this object."
@@ -39,7 +40,7 @@ class Feature(GDALBase):
             if index < 0 or index > self.num_fields:
                 raise OGRIndexError('index out of range')
             i = index
-        return Field(self.ptr, i)
+        return Field(self, i)
     
     def __iter__(self):
         "Iterates over each field in the Feature."
diff --git a/django/contrib/gis/gdal/field.py b/django/contrib/gis/gdal/field.py
index 12dc8b9..dc4d2b3 100644
--- a/django/contrib/gis/gdal/field.py
+++ b/django/contrib/gis/gdal/field.py
@@ -22,7 +22,7 @@ class Field(GDALBase):
         self._index = index
 
         # Getting the pointer for this field.
-        fld_ptr = capi.get_feat_field_defn(feat, index)
+        fld_ptr = capi.get_feat_field_defn(feat.ptr, index)
         if not fld_ptr:
             raise OGRException('Cannot create OGR Field, invalid pointer given.')
         self.ptr = fld_ptr
@@ -42,20 +42,20 @@ class Field(GDALBase):
     #### Field Methods ####
     def as_double(self):
         "Retrieves the Field's value as a double (float)."
-        return capi.get_field_as_double(self._feat, self._index)
+        return capi.get_field_as_double(self._feat.ptr, self._index)
 
     def as_int(self):
         "Retrieves the Field's value as an integer."
-        return capi.get_field_as_integer(self._feat, self._index)
+        return capi.get_field_as_integer(self._feat.ptr, self._index)
 
     def as_string(self):
         "Retrieves the Field's value as a string."
-        return capi.get_field_as_string(self._feat, self._index)
+        return capi.get_field_as_string(self._feat.ptr, self._index)
 
     def as_datetime(self):
         "Retrieves the Field's value as a tuple of date & time components."
         yy, mm, dd, hh, mn, ss, tz = [c_int() for i in range(7)]
-        status = capi.get_field_as_datetime(self._feat, self._index, byref(yy), byref(mm), byref(dd),
+        status = capi.get_field_as_datetime(self._feat.ptr, self._index, byref(yy), byref(mm), byref(dd),
                                             byref(hh), byref(mn), byref(ss), byref(tz))
         if status:
             return (yy, mm, dd, hh, mn, ss, tz)
diff --git a/django/contrib/gis/gdal/layer.py b/django/contrib/gis/gdal/layer.py
index a2163bc..b2fef51 100644
--- a/django/contrib/gis/gdal/layer.py
+++ b/django/contrib/gis/gdal/layer.py
@@ -57,7 +57,7 @@ class Layer(GDALBase):
         # ResetReading() must be called before iteration is to begin.
         capi.reset_reading(self._ptr)
         for i in xrange(self.num_feat):
-            yield Feature(capi.get_next_feature(self._ptr), self._ldefn)
+            yield Feature(capi.get_next_feature(self._ptr), self._ldefn, self)
 
     def __len__(self):
         "The length is the number of features."
@@ -77,7 +77,7 @@ class Layer(GDALBase):
         if self._random_read:
             # If the Layer supports random reading, return.
             try:
-                return Feature(capi.get_feature(self.ptr, feat_id), self._ldefn)
+                return Feature(capi.get_feature(self.ptr, feat_id), self._ldefn, self)
             except OGRException:
                 pass
         else:
diff --git a/django/contrib/gis/gdal/tests/test_ds.py b/django/contrib/gis/gdal/tests/test_ds.py
index 71d22a0..34f0399 100644
--- a/django/contrib/gis/gdal/tests/test_ds.py
+++ b/django/contrib/gis/gdal/tests/test_ds.py
@@ -141,6 +141,8 @@ class DataSourceTest(unittest.TestCase):
         lyr = get_layer()
         self.assertEqual(source.nfeat, len(lyr))
         self.assertEqual(source.gtype, lyr.geom_type.num)
+        # Same issue for Feature/Field objects, see #18640
+        self.assertEqual(str(lyr[0]['str']), "1")
 
     def test04_features(self):
         "Testing Data Source Features."
