Thread safety analysis: handle duplicate assert_lock attributes.