Help with "alphametics" exercism exercise

Update: I’ve fixed the nonzero-letter extraction in my original approach, and submitted it to Exercism at Exercism – it strikes me as more elegant, so it might be a better starting point, but it’s even slower.