Slightly refactored the optimizer regarding navigational walks.
Authored by: dimitr 2013-06-30
Parent: [r58277]
Child: [r58279]