Lazily compile lambdas if possible.