Esc key action should be applied only to top level overlay.

We shouldn't hide all the created overlays present in the stack on
the escape key action. Just like click Escape key action should be
applicable only to the overlay at the top of the stack.