Fixed bugs regarding class method mocking in class hierarchies.