Depends, yet again, on the exact wording of the will.
If the bequest is "€10,000 to the parish priest for the time being of Toureendohenybeg" and the PP disclaims it, it falls back into the residue.
But if it's "€10,000 to the parish priest for the time being of Toureendohenybeg for the celebration of masses for the repose of my soul at a stipend of €5 per mass" and the parish priest disclaims it, that's different. A charitable purpose has been stipulated, and the rxecutor must try to apply the €10,000 to that purpose. Perhaps he can find some other person or institution that will arrange for the masses to be said?
He must try to acheive the charitable purposes — in this case, the celebration of 2,000 masses — as closely as he can. If he can't find anyone who will arrange for the celebration of 2,000 masses, he can settle for a lower number. But he can't, e.g,, apply the money to an entirely different purpose, even if it is also charitable. So there wil be no unexpected windfall for the Cats' and Dogs' Home.