Red Oak Prairie, Allamakee County, Iowa, USA July 25, 2016
I saw this sign a few times on shoots of black walnut in 2016. In this case I tore into it, revealing a larva inside. Definite head capsule so not Diptera, but with these pictures, unfortunately, I can't quite tell if it's a lep or a beetle (can't rule out sawfly either I suppose ;)
I've heard that walnut is a tough plant, chemically speaking, and it always amazes me to find insects eating such plants.
Disclaimer: Dedicated naturalists volunteer their time and resources here to provide this service. We strive to provide accurate information, but we are mostly just amateurs attempting to make sense of a diverse natural world. If you need expert professional advice, contact your local extension office.