if( n == forbiddenTree ) return null;
if( n == null || n == forbiddenTree ) throw new IllegalArgumentException("n==null or recursed into forbidden tree");
  protected MarkableBaseNode doGetRandomNode( int pos, MarkableBaseNode n, boolean isUnmarked,     MarkableBaseNode forbiddenTree ) {    if( n == forbiddenTree )      return null;    if( pos == SCAN_UNMARKED ) {      if( !n.isMarked() )        return n;      else {        MarkableBaseNode found = null;        for( int i=0;i<n.getChildCount() && found == null;i++)          found = doGetRandomNode(pos,(MarkableBaseNode) n.getChild(i),isUnmarked,forbiddenTree);        return found;      }    }    if( pos == 0 ) {      if( isUnmarked && n.isMarked() )        return doGetRandomNode(SCAN_UNMARKED,n,isUnmarked, forbiddenTree);      else        return n;    }    int stSize = 0;    MarkableBaseNode child= null;    for( int i=0;i<n.getChildCount() && pos>=0;i++) {      child = ((MarkableBaseNode) n.getChild(i));      stSize = child == forbiddenTree ? 0 : child.getSubteeSize();      pos-= stSize;    }    return doGetRandomNode( pos + stSize, child, isUnmarked, forbiddenTree );  }