juliatypes.jl: fixes to UnionAll

match depth of variables inside invariant constructors