Fix for #16455

This reverts 5fdd86, which introduced a self-referential dictionary-- which mean that it could never be garbage collected.