Stashing ElementMap and IdCounters when editing