Enhancement
The StackedGotoHandler clears the stack if the context component is a LayoutContainer. This seems to be unnecessary as the comment says that this was introduced in case the context component is the MainLayout.
Improvement
This special case should only occur if the context component is really the MainLayout.
Test
No test.