Fix for calculation of LCP sub intervals and length of said intervals.
Added tests.