Fix to not patch classmethods.