Heat the instant pot on saute function. Add the onion, carrot and celery for about 3 minutes. Add the turnip, lentils, thyme, bay leaf, rosemary and stock.
Lock the lid and bring to high pressure for 10 minutes. Allow the pressure to come down naturally. Remove the lid and add 1-2 Tbs browned rice flour, Worcestershire sauce, Tamari, tomatoes and tomato paste. Stir, then replace the lid and allow it to sit for 3 minutes. Quick release any built up pressure.
Discard the bay leaf and transfer the filling to a casserole dish or individual ramekins. Top with the mashed potatoes. Run under the boiler to brown or at least heat the potatoes.