Here's the scenario.
I've got a dll, Test1.dll that contains a behaviour, testBehaviour.cs. I've then got a prefab, TestPrefab.prefab that uses testBehaviour.cs. Finally, I've got another dll, Test2.dll, that references Test1.dll in the project.
I create a unity package that contains Test1.dll and TestPrefab.prefab named First.unitypackage.
I create a second unity package that contains Test2.dll and Test1.dll (Test1.dll is needed because it is being used within Test2.dll), named Second.unitypackage.
Now here is the problem. If I import First.unitypackage into the scene, the behaviour that is referenced on the prefab gets resolved correctly. However, if I import the Second.unitypackage first, and then import First.unitypackage, the behaviour is not resolved correctly and comes up with a missing behaviour on the prefab.