Fix #139: Locks called from another lock weren't correctly recognized.