Issue was introduced by yesterday's commit 47021 and caused by some handler's
which is getting called from ui_handler_popup frees event.
Worked around a bit by storing return value for ui_handler_popup before running
other handlers, but this only means global refactor of even handling order is
getting closer and closer.