fixed the missing cardinality constraint bug

cardinality was computed for the parent instead of the child, which is
why for

a n..m
b

b always had cardinality n..m