MetaPos: switch to id based node access

This is a bit slower, but invariant to pointer changes and therefore
robust with respect to the undo/redo system.