I had a similar issue some time ago and if your problem is the same as
mine you should look at DiagramUpdater, ViewProvider and VisualIdRegistry
classes.
In my case, two classes on my metamodel were using the same link and
therefore I created two link mappings, however as the target of the links
were the same and the unique difference was the containment feature, in
the generated code VisualIdRegistry always returned the same visual_Id
(the one for the first created linkmapping). Then, when the link was to be
painted a suitable ViewProvider were searched but unfortunately, as we had
a bad Visual_ID, in somewhere (Sorry, I don't remember exactly where) a
check returned null. I solve that using java constraints to check the
parents of the links and then make VisualIdRegistry able to dintinguish
between the two links.
I don't know if your problem is the same as mine but I think that looking
at that classes can be helpful. Well, Alex can say if it's the correct
point or if I am wrong.