function_hooks: fix up db_compare_callback()