Inline LCA function as only used once