@contype must be cloned because the caller (advanced_button_clicked_cb()) deallocates it.
Fixes: d0f56b5e