Added test to ensure that DescendantsTracker does not leak memory on singleton classes
Merge pull request #8491 from igagnidz/master

Issue #8442
Improve the test code for #8422

* Remove unneeded comments.
* Use key? instead of keys.include?.