Support for navigation in lifecycle methods.

Fixes ERRAI-516

New pull request against 2.4 branch