PERF: fix slow s.loc[[0]]

Fixes GH9126
Merge pull request #9127 from shoyer/fix-slow-loc

PERF: fix slow s.loc[[0]]