Start layering up the sliced potatoes with sprinklings of the shallots, garlic, thyme leaves, cheese and most of the walnuts, plus plenty of seasoning. Drizzle a little of the cream mixture over each layer too. When you’ve layered in half of those ingredients, top with half of the tomatoes. Continue layering the rest of the ingredients, finishing with the last of the cream. Top with the remaining tomatoes, then sprinkle over the breadcrumbs, the remaining Parmesan and walnuts, and enough thyme to look pretty. Add a few more knobs of butter, then cover with foil.