[Olena-patches] 3174: Improve LCA in Laurent's code.