As each layer is processed, it increases in size by a factor of two or three so by the end the layer list gets quite big. So this removes the list entry after it's been processed.