Groupby wrong behavior?
I already wrote about this in [stackoverflow](https://stackoverflow.com/questions/47886997/pandas-groupby-error-on-groupby) but got no answers.

Is there a reason why swapping the elements in val2, groupby returns a different result?
Index changes from MultiIndex to DateTimeIndex and the group-time is lost.

```
import pandas as pd
from datetime import datetime

def legend(text, obj):
    print "\n" + "="*50 + "\n" + text
    print obj.head(1000)

df = pd.DataFrame({'dtime': [datetime(2017,01,01,1,5), 
                             datetime(2017,01,01,1,20)],
                   'val1': [11, None], 
                   'val2': [None, 31]  # [31, None] <=== this doesn't work!
                  })
legend("10 Original df", df)

df = (df.melt("dtime")
        .dropna()
        .set_index("dtime"))
legend("20 After melt", df)

group = df.groupby(pd.Grouper(freq="1H"))
legend("30 Group by dtime", group)

group = group["value"].apply(lambda x: x.sort_values(ascending=False))
legend("40 Find max 3 for each hour", group)

df = pd.DataFrame(group)
print "\n\nIndex info:", df.info()
```
