Do not report spurious deadlocks caused by TRY_LOCK

Backported from bitcoin commit f342dac1cb06d5b0d264fa59e448ef6477ec5b6b