smartxml: fix - getIndex returns undefined for a node not attached to a document...