compositor: fix invalid write when deleting an output