make sure we never look past the end of either string in ldb_comparison_fold()