Fixed race where functor_calls was being incremented by multiple threads without a lock.