Fix a bug involving windowlist, splits and layouts