Was a bug when switching between item/tab view where out of bounds errors could occur.
Fix refresh sorting issue on view change
Make warnings more explicit and 'safer'. This by itself would have fixed crashes caused by calling rowCount in
old assertion with out-of-date parent.

Sort was not stable for item, resulting in indeterminate ordering on
every update. Update to sort by name first (so items are in name order
in display) then by universal id.
Clean up sort routine for location.