Only add public extern(D): if a class actually has children.