Fix nesting of package references.