BUG: GH2817 raise the correct KeyError that the multi-index is not sorted

closes #2817