Here a dogwood clubgall midge seems to have pupated in the gall rather than in soil.
Photo by J.R. Baker, NC State University