Perform localized, evaluation-leak free replacements