Bugfix root array

refactored the mechanism if a struct belongs into linked
before my change, the function tried to determine if the object that has to be marshalled belongs into linked or not. This was done by checking if the object's name was the same as the root object, which caused the problem here, because dependent objects from the same type/name belong into linked and not root