Fix lack of propagation of purity within a lambda.