Make the pastry by whizzing together the gluten-free flour and walnuts in a food processor until the walnuts are finely ground. Add the diced butter and pulse a few times until the mixture looks like breadcrumbs. Then add 1 to 2 tbsp of ice cold water and pulse once more to combine.
Tip the dough out onto a lightly floured surface and knead briefly, then flatten into a disk and wrap in cling film. Chill for 30 minutes.
In the meantime, make the filling. Heat the oil in a small frying pan and add the shallots and the thyme leaves of three sprigs. Cook over a gentle heat for 6-8 minutes, until the shallots have softened. Tip them into a jug, along with the beaten egg and milk. Season to taste.
Grease a 12-hole mini, non-stick muffin tin with oil. Once the dough has chilled, roll it out on a lightly floured surface until it’s the thickness of a pound coin. Using a 6.5cm cutter, cut out 12 rounds. You might have to re-roll some of the pastry again, to stamp out the final few.
Press each round into the muffin hole, then place the tray into the freezer for 30 minutes. Preheat the oven to 180°C/fan 160°C/ gas mark 4.
Once the pastry has chilled, divide the filling between the holes, then divide the cranberries, and finally sprinkle each one with the Stilton.
Bake in the oven for 25 minutes, then leave to cool in the tin. Once cool, carefully remove the tartlets from the muffin tin using a butter knife to help you. Sprinkle the tarts with the remaining thyme leaves.