For the filling, place the onions, carrots, celery and garlic into a food processor and pulse until roughly chopped.
Heat the oil in a large pan or casserole dish over a medium heat and add the vegetables. Fry for 15-20 minutes, stirring occasionally, until softened but not coloured.
While the vegetables are cooking, pulse the lamb meat in the food processor until roughly chopped and add to the vegetables in the pan. Heat through for 1-2 minutes, then stir in the flour. Cook for a further 2-3 minutes.
Pour in the wine, increase the heat and simmer for 3-4 minutes, or until most of the alcohol has evaporated. Stir in the thyme, Worcestershire sauce, anchovy essence, mushroom ketchup, redcurrant jelly (if using), chopped tomatoes and stock or gravy. Bring to the boil, then reduce the heat and simmer, uncovered, for about 20 minutes. Season to taste with salt and freshly ground black pepper.
Preheat the oven to 200C/400F/Gas 6.
For the mash topping, peel and cut the potatoes into chunks, place into a medium pan and cover with cold water. Bring to the boil and cook for 15 minutes, or until the potatoes are tender.
Drain the potatoes well and return to the pan. Place over a low heat to dry out the potatoes slightly, then remove from the heat and add the milk and butter. Mash with a potato masher or fork, then season to taste with salt and freshly ground black pepper.
Spoon the lamb mixture into an ovenproof dish and layer over the mashed potato. Smooth out the topping with the back of a spoon. Bake for 20 minutes, or until the topping is golden-brown.