Heat the oven to 160C/140C fan. Heat the oil in a large, lidded, hob to oven casserole dish. Brown the meat well. Don't overcrowd the pan, cook in two or three batches if necessary. Set the meat aside on a plate and reduce the heat in the pan.
Cook the onion, carrots and celery with the lid on, stirring occasionally, for 10 minutes until the vegetables start to soften. Stir in the garlic then the tomato puree and the herbs. Sprinkle over the flour and stir, cooking for a minute or two.
Return the meat and any juices to the pan then pour in the wine, stirring continuously and scraping the bottom of the pan. Repeat with the stock, stir well and season and bring to a simmer. Put the lid on and cook in the oven for 2 hours.
When the stew is cooked and the meat is tender, remove from the oven and check the top for any pools of fat. Skim the surface if necessary then check the seasoning and adjust if needed. Transfer to a pie dish, taking care not to burn yourself.
Roll out the pastry and cut a slim strip to fit the rim of the dish. Brush the rim with a little beaten egg and stick the pastry strip on. Brush with more egg and lay the rest of the pastry over the pie. Trim with a sharp knife and press the edges of the pie top and pastry rim together with your fingers or a fork. Brush the top of the pie with egg wash and gently score a diamond pattern, without cutting all the way through the pastry. Cook in the oven for 30 minutes until the top is golden brown and puffed up.