title: Pandas merge is not working with identical keys
body: <p>Here is the example from <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.merge.html" rel="nofollow noreferrer">documentation</a>:</p>
  <pre><code># Works
  df1 = pd.DataFrame({'lkey': ['foo', 'bar', 'baz', 'foo'],
                     'value1': [1, 2, 3, 5]})
  
  df2 = pd.DataFrame({'rkey': ['foo', 'bar', 'baz', 'foo'],
                      'value2': [5, 6, 7, 8]})
  
  df1.merge(df2, left_on='lkey', right_on='rkey')
  </code></pre>
  <p>And that works fine.</p>
  <p>But if I try with a dataframe with identical keys:</p>
  <pre><code>df1 = pd.DataFrame({'key': ['foo', 'bar', 'baz', 'foo'],
                     'value1': [1, 2, 3, 5]})
  
  df2 = pd.DataFrame({'key': ['foo', 'bar', 'baz', 'foo'],
                      'value2': [5, 6, 7, 8]})
  
  df1.merge(df2, left_on='key', right_on='key')
  </code></pre>
  <p>I get this error:</p>
  <pre><code>    self._cache.clear()
  AttributeError: 'NoneType' object has no attribute 'clear'
  </code></pre>
  <p>Does anyone know why this is?</p>