Avoid keeping references to tests.

This should allow tests to be garbage collected.