Deadlock prevention by not calling alien methods while locking.