implemented lastIndexOf()
fix slight misbehaviour of TreeIterator.remove()