db: fix how &foo->lock states are inserted into the caller_info table