Note: A lot of the change here is just a retab caused by an early
```c
if (!pItem->IsSelected())
  continue;
```