RDF generation fix

This corrects the case where an entity class instance points to another
entity class instance and the construction is not a set or a list.