Fix text replacement for lambda lifting