Some bugfixes for lcsm, though it's still pretty slow, and brute forcing the problem.