fix setIndex to include last item

I am using blessed to reorder windows on the screen. When I bring a window to the front, it always becomes the second-most front window, behind the last window added to the system.

This change fixes that behavior.