fix(frontends/lean/parser): segmentation fault after REPLACE, fixes #172