Properly update graph rectangle when all nodes are removed