In a medium saucepan, combine the lentils, water, turmeric, salt and chilli flakes. Bring to a boil, then reduce heat to a gentle simmer. When the lentils are soft, add the butter and using a hand blender, partially mash the lentils. Keep the heat on very low.
In a small saucepan, heat the oil and fry the onions till golden brown. Add the onions, green chillies and coriander leaves to the lentils.
In the same small saucepan, heat the oil, and gently fry the asafoetida, garlic, ginger, cumin, and fenugreek seeds. As the garlic begins to turn golden, turn off the heat and immediately pour over the lentils and cover. Add lemon juice. Serve with steamed rice.