I agree with you. We can consider it too "clever" for the frequency it is to be called.
I guess calculating just the visual indexes and then mapping back the logical indexes
would have suffice.