Fix find_modal (and accept_modal) to work with nested dismiss_confirm/accept_alert calls.