ORA-04020: deadlock detected while trying to lock object - Oracle Package I have an Oracle Package (Schema1) that is calling another Oracle Package (Schema2) over a DB link. There are no recent code changes.

When I try to compile the package in (Schema1) it throws the following errors.

(replaced the actual schema names with 1 and 2 for clarity)


  ORA-04052: error occurred when looking up remote object
  SCHEMA2.PKG_NAMEHERE@SCHEMA2.LINKNAME.INT@SCHEMA1
  
  ORA-04020: deadlock detected while trying to lock object
  SCHEMA2.PKG_NAMEHERE@SCHEMA2.LINKNAME.INT@SCHEMA1


What we have tried


Killed all user sessions
Recompiled the package in SCHEMA2 even so SCHEMA1 that calls it over the DBLINK failes with "ORA-04020: deadlock detected"


We have 4 Database regions, and this is only happening in two of the regions. 

Notes:

SCHEMA1: Oracle 11g

SCHEMA2: Oracle 12c (on ExaData)
Look at this webpage https://docs.oracle.com/cloud/latest/db112/LNPLS/nameresolution.htm#LNPLS017, especially the INNER CAPTURE section. 
Does the package exist on both sides of the link or only one? 
What does the ORA-60 deadlock trace file show?
What does DBMS_UTILITY.NAME_RESOLVE show for "SCHEMA2.PKG_NAMEHERE@SCHEMA2.LINKNAME.INT@SCHEMA1"?
Do the DBLINKS loopback?