Ensure meta-class is restored for Class spies

[Fixes #78068472]