Why is this an issue?

To avoid confusion, even in different scopes, there should not be multiple packages with the same name.

How to fix it

Code examples

Noncompliant code example

File 1:
package fly;
  ...
endpackage

File 2:
package dream;
  package fly;
    ...
  endpackage
  ...
endpackage

Compliant solution

File 1:
package fly;
  ...
endpackage

File 2:
package dream;
  package sleep;
    ...
  endpackage
  ...
endpackage