Allow enclosed classes

both the enclosing classes and the nested classes must have accessible nullary constructors for this to work