#1976: Allowed constant optimization for variable with a weight of 1.0 and made the constant optimization thread-safe (access to evaluated node results).