Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/listview.c:
{ if ((infoPtr->uView == LV_VIEW_LIST) || (infoPtr->uView == LV_VIEW_DETAILS)) {
while (nItem < infoPtr->nItemCount)
while (nItem < infoPtr->nItemCount - 1)
This looks correct at first glance. Do you have an application affected by this? It seems to me changing this only reduces some time and -1 will be returned if it's the last item.