For the curry powder, heat a small frying pan over a medium heat and toast the rice, stirring, until it starts to brown. Tip in the rest of the spices and toast for 3-5 mins until brown but not burned. Using a spice grinder or pestle and mortar, blitz or grind to a fine powder. Pass through a sieve. Will keep for up to three months in an airtight container.
Heat the oven to 200C/180C fan/gas 6. Toss the squash with 1 tbsp of the oil, a pinch of salt, 3 tbsp of the tamarind sauce, the chilli flakes and coconut. Spread out on a baking sheet and bake for 35-40 mins, or until tender.
Heat the remaining 2 tbsp oil in a wok over a high heat. Fry the mustard seeds for a minute or so until they sizzle and pop, then add the curry leaves and cook for a few more seconds until they crackle. Add the onion, ginger, garlic, chilli, lemongrass and a pinch of salt and stir for a few minutes until the onion softens. Tip in the chickpeas, tomato, curry powder and turmeric and keep stirring for 5-8 mins, until the tomato breaks down.
Pour the coconut milk into the wok and stir, cooking for about 5 mins until slightly reduced. Add the remaining 2 tbsp tamarind, taste for seasoning, then add the kale, stirring for a couple of minutes until softened. Divide the squash between bowls, ladle in the curry sauce, then top with the coriander and coconut flakes, if using. Serve with warmed flatbreads.