Because he's deleting from `modules` inside the loop.