KeyError using custom aggregation function
```python
import pandas as pd

df = pd.DataFrame.from_dict([
    {'A': 1, 'B': 'cat', 'values': 1},
    {'A': 1, 'B': 'cat', 'values': 1},
    {'A': 1, 'B': 'dog', 'values': 1},
])
df.set_index(['A', 'B'], drop=True, inplace=True)

# works
g = df.groupby(['A'])
print g.agg(lambda x: {'values': x['values'].mean()})

# doesn't work
g = df.groupby(['A', 'B'])
print g.agg(lambda x: {'values': x['values'].mean()})
```
#### Problem description

The current behaviour is **KeyError: 'values'** in the second example, the first one works as expected.

#### Expected Output
```
    values
A        
1     1.0
       values
A B          
1 cat       1.0
  dog       1.0
```
#### Output of ``pd.show_versions()``

<details>

- commit: None
- python: 2.7.12.final.0
- python-bits: 64
- OS: Linux
- OS-release: 4.10.0-37-generic
- machine: x86_64
- processor: x86_64
- byteorder: little
- LC_ALL: None
- LANG: en_US.UTF-8
- LOCALE: None.None
- pandas: 0.20.3
- pytest: None
- pip: 9.0.1
- setuptools: 36.5.0
- Cython: None
- numpy: 1.13.3
- scipy: 1.0.0
- xarray: None
- IPython: 5.5.0
- sphinx: None
- patsy: None
- dateutil: 2.6.1
- pytz: 2017.2
- blosc: None
- bottleneck: None
- tables: None
- numexpr: None
- feather: None
- matplotlib: 2.0.2
- openpyxl: None
- xlrd: None
- xlwt: None
- xlsxwriter: None
- lxml: None
- bs4: 4.6.0
- html5lib: 1.0b10
- sqlalchemy: None
- pymysql: None
- psycopg2: None
- jinja2: 2.9.6
- s3fs: None
- pandas_gbq: None
- pandas_datareader: None

</details>