Fixed typo in local optimization.

Bug report by Victor Pfautz.