ui_qt: handle basic block which points to itself