Dead top branches on a young walnut

I have a walnut tree that was planted a year and a half ago. It’s been doing quite well, despite some damage from wild boar, but in the last few days the top three branches (all this year’s growth) have suddenly died.

Looking closely, I see a small hole above the next branch down, which looks like the entrance hole of some boring insect larva (about 2-3mm diameter). But could this have killed the branches? The outer bark all looks healthy, and so does the terminal bud, above the damage.
I’ve had other trees (apple and oak) damaged by leopard moths (Zeuzera pyrina), and in the case of the apple it did kill everything above the damage. But that was a much bigger tunnel, and the outer bark was visibly damaged.

I’m wondering what I should do now. I can try to kill the “worm” with a fine wire, though it will be difficult to get it in since the hole is directly above a branch. Should I cut the top of the tree down to the next bud below the damage, or should I leave it (maybe block the hole up with something?) in the hope that the terminal bud will survive and grow?