Fix invalid "! doLoop" assertion on plugin UI close