BUG: loc was failing on integer slices (incorrect implementation), GH 3053

fixes #3053