Scope time calculations need to go in a lambda.