BUG: fix for index name lost #9857 and also added the corresponding test in test_index.py
closes issue #9857 

merged via https://github.com/pydata/pandas/commit/f8ca3b731ca47b2eaccb9f0044f7b60c0c592560

thanks!
