newdb: Fix bools_are_tristate preference not being respected when sorting