private boolean searchUpForNextSupersetNode( Node node, K key, Object[] ret ) {
        if( node.mRight != null && mComp.compareMaxes( key, node.mRight.mMaxStop.mKey ) <= 0 ) {
            // Request downward search on right subtree.
            ret[0] = node.mRight;
            return false;
        }

        while( node.mParent != null ) {
            if( node == node.mParent.mRight ) {
                node = node.mParent;
            } else {
                node = node.mParent;

                // If we're coming from the left path, it means we haven't
                // checked the current node or right subtree.
                if( mComp.compareMins( key, node.mKey ) >= 0 ) {
                    if( mComp.compareMaxes( key, node.mKey ) <= 0 ) {
                        ret[0] = node;
                        return true;
                    }

                    // Check if right might contain mKey.
                    if( node.mRight != null ) {
                        if( mComp.compareMaxes( key, node.mRight.mMaxStop.mKey ) <= 0 ) {
                            // Request downward search on right subtree.
                            ret[0] = node.mRight;
                            return false;
                        }
                    }
                }
            }
        }

        // Search completed.
        ret[0] = null;
        return true;
    }