it was very tricky to track down, and looks like it was from a component library i've used a lot. it's code to enable drag and drop of files onto the form. the code reroutes windows messages on start up using a call to SetWindowLong:
Which basically reroutes windows messages for the target wnd element to new function -- that's what lets the code handle drag and drop onto a target form UI element.
And it seems that for whatever reason, on win7 some messages are getting sent to that rerouted function in the middle of destruction, when the new code/object is being torn down and no longer exists.
The solution was simply to un-reroute the windows message procedure before any destruction -- not sure why that was not being done before except that it didn't seem to make a difference before.