merge errors with pandas 0.25.3
I am using using pandas version 0.25.3 and Python 3.7.4

```python
students = pd.DataFrame({
    'name': ['Dev', 'Prem', 'Kiran', 'Manish', 'Sandeep', 'Deepika', 'Amit'],
    'class': ['7A', '7B', '7D', '7A', '7B', '7B', '7C'],
    'gender': ['M', 'M', 'F', 'M', 'M', 'F', 'M'],
    'roll': [1, 2, 3, 4, 5, 6, 7]
}).set_index('roll')

maths = pd.DataFrame({
    'sr': [1, 2, 3, 5, 6],
    'marks': [45, 23, 76, 87, 45],
}).set_index('sr')

students.merge(maths, left_on='roll', right_on='sr')
# KeyError: "None of ['roll'] are in the columns"

pd.merge(students, maths, left_on='roll', right_on='sr')
# KeyError: "None of ['roll'] are in the columns"
```
#### Problem description
When I used pandas 0.25.1, `students.merge` worked but `pd.merge` did not work.
Now both aren't working.

#### Output of ``pd.show_versions()``

<details>
commit           : None
python           : 3.7.4.final.0
python-bits      : 64
OS               : Linux
OS-release       : 5.0.0-36-generic
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 0.25.3
numpy            : 1.17.2
pytz             : 2019.2
dateutil         : 2.8.0
pip              : 19.2.3
setuptools       : 41.2.0
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : 2.2.0
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : 2.10.1
IPython          : 7.8.0
pandas_datareader: None
bs4              : None
bottleneck       : None
fastparquet      : None
gcsfs            : None
lxml.etree       : None
matplotlib       : None
numexpr          : None
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pytables         : None
s3fs             : None
scipy            : 1.3.1
sqlalchemy       : None
tables           : None
xarray           : None
xlrd             : None
xlwt             : None
xlsxwriter       : None
</details>