py_string_similarity fails on long strings