TST/FIX sparse: ensure correct operation of has_sorted_indices

This had used a mangled attribute incorrectly. Here's one patch. The alternative is to not use mangled attributes.