If You press Undo/Redo - all properties returned into Select/UnselectItem will go 0 (zero).
Still I very believe that this is very bad approach - not to expose the items directly, since the programmers are left practically with no options to be free and complete their tasks. This should never happen with a components i believe.
Please expose directly all items which is participating into the edit, and set them unique identifiers.