Thanks for being straight. I understand the rule back from school. But never tested in real design. Now it bites. I will switch back to common package.
This comes about because you have used the same name in two packages. A local type declaration will override anything included in packages, unless you specifically ask for the "other" one.
To differentiate and make this error go away, when you include the same type from two different packages, you need to specify which one you mean:
signal a : package1.my_array;
signal b : package2.my_array;
But remember, the are different types, so the following would be illegal: