Hi,
I don't mind to release code to the public since it's based on Tree-Ternary_XS code (you can still see it in POD in BK_XS.pm:) and includes Text-LevenshteinXS anyway.
Here is a link to source code .rar package
I would be appreciated if u could look at it and give me a help with this problem.
PS. I no expert in C (last time i used it was in college;) nor in XS so please, be understanding while reading the code :)