Properly index windows in detector list mode

Fix iteration over single windows: whether one or more windows are
listed for an image, generate windows as a list.