Normally local_optimizer makes sure of that.