FIX incorrect sorting during fancy assignment

Bug reported by @perimosocordiae on #3264

One of the tests added here fails on master in `TestCSR.test_fancy_indexing_multidim_set`
Should this actually be before `if do_sort`?

Namely, the problem is probably that at some point `has_sorted_incides` is not updated when some modification is made that (potentially) makes the indices unsorted?