In a large saucepan, melt the butter. Add the lemongrass, shallots, garlic, chiles and a generous pinch of salt. Cook over moderately high heat, stirring, until the shallots are softened and just starting to brown, about 2 minutes. Add the beer and boil until evaporated, about 3 minutes. Add the tomatoes and kaffir lime leaves, then crush the tomatoes with a wooden spoon. Simmer over moderately low heat until most of the liquid has evaporated, about 5 minutes. Add the coconut milk and simmer over moderate heat, stirring occasionally, until thickened, about 15 minutes.