Proper handling of package references