Yeah, that is basically what is in this commit, but using the "offset" selector for get/setSelectedModels :)

If we use get/setSelectedModels() without the "offset" argument the functions will reference the "this.selectedItems" value, which happens to be exactly the value we are trying to update.  The results of doing that is the function returning an array with undefined values where the currently deleted model would be.

For something that should be so simple this code gets hairy really fast (not a bash on it, just an observation).