[DROOLS-134] Metadata inheritance is not resolved correctly when typeDeclarations are created implicitly