Fixed #6154: Don't suggest to reduce scope if inner scope is a lambda.