JsonFactorizingDiff: refactor getLCSDiffs a little