vingarzan left a comment (kamailio/kamailio#4191)
The problem with "to (hopefully) have the same locking order as the other operations" is that in theory it might solve the immediate issue... but in practice the poison remains in the fridge :stuck_out_tongue_closed_eyes: ... How long until someone won't observe this and mess it back up again? So the proper solution I think is to unwind the need to hold both locks at the same time.