Apply the same test.
You could go to the supermarket and buy bottled beer duty paid. You could go to your local brewery and buy kegs duty paid and give that beer, for free, to your guests. But, I do think this is a slightly greyer area than the wedding scenario.
If it were, say, a family member of departed, the executor etc who was organising the whole thing AND doing the brewing I would suggest it would be fine. It's their party and they're catering so if THEY brewed it its their beer and they can use it in this way - just as they would with bought beer.
To ask someone else to brew for it will be the contentious point.
I don't think the "intention to raise money for charity" is a problem as that's not the purpose of the event, the event is a wake first and foremost.
The music and performance licence is a biggie though. Self-catering wedding venues have this covered already so not really a consideration, performances happen, service of alcohol (with or without the exchange of money) happens and it is all covered by the venue itself.
On balance I'd say that while the chances of being "caught" are pretty slim, it would be easier for HMRC to prosecute if they did come knocking and with that number of people attending the chances of an eyebrow or two being raised by those not attending and the chances of one or two of them not playing nice and causing a nuisance would be too high for me...