Fixed bug: when optimizer removes the query, query vertex now handles it properly by reporting results and requesting vertex removal