No common parent type generated by compiler
Hi,

I dont know if I have found an issue or if this is already well known.
Please have a look at the following ksy:
```ksy
meta:
  id: dummy
types:
  some_instance_type:
    instances:
      link:
        type: sub_type
  some_other_instance_type:
    instances:
      link:
        type: sub_type        
  sub_type:
    instances:
      my_value:
        value: 3
instances:
  link:
    type: some_instance_type
```

This generates the sub_type with parent type of some_instance_type not the common KaitaiStruct (at least for C# and Java, see 7.7. Enforcing parent type in User Guide):
```csharp
public SubType(KaitaiStream p__io, Dummy.SomeInstanceType p__parent = null, Dummy p__root = null) : base(p__io)
```

This will actually not compile, since it is tried to pass a SomeOtherInstanceType as SomeInstanceType:
```csharp
                        _link = new SubType(m_io, this, m_root); // within SomeOtherInstanceType
```

**Only if some_other_instance_type is referred from the root, the compiler will generate the generic KaitaiStruct parent type.**
like:
```ksy
instances:
  link:
    type: some_instance_type
  link_2:
    type: some_other_instance_type
```

One might ask, why is some_other_instance_type not used from the root?

There might be several reasons like:

- you want to create the instance by hand
- you want to make a partial implementation using the type

Imho the generic type should be generated in any case.
Or please correct me, if I have some misunderstanding in this case.

Greetings and thank you in advance.

JF