Inherited classes were not correctly handled in C#.