Remove invalid contexts from the node_edit variant.