Fix containingClass for created methods.