Support more than direct subclassing

Also make encodingExcludedPropertyNames a class method.