git rid of circular reference in global structure

an anon sub closes over structure where it's stored,
this is circular reference that prevents on time garbage
collection.

it's not a leak right away as strucutre is global and
never changed by core, but any plugin that changes it
may result in a steady leak, so take counter measures.
Merge branch '4.2/potential-leak' into 4.2-trunk