Fix recursive lock in circuit