private boolean niFindNextHCI(PhEntry<T> result) {
    // HCI
    // repeat until we found a value inside the given range
    long currentPos = next;
    do {
      if (currentPos != START && currentPos >= maskUpper) {
        break;
      }

      if (currentPos == START) {
        // starting position
        currentPos = maskLower;
      } else {
        currentPos = PhTree11.inc(currentPos, maskLower, maskUpper);
        if (currentPos <= maskLower) {
          break;
        }
      }

      Object v = node.ntGetEntry(currentPos, result.getKey(), valTemplate);
      if (v == null) {
        continue;
      }

      next = currentPos;

      // read and check post-fix
      if (readValue(currentPos, v, result)) {
        return true;
      }
    } while (true);
    return false;
  }
  private boolean getNextHCI(PhEntry<T> result) {
    // Ideally we would switch between b-serch-HCI and incr-search depending on the expected
    // distance to the next value.
    long currentPos = next;
    do {
      if (currentPos == START) {
        // starting position
        currentPos = maskLower;
      } else {
        currentPos = PhTree11.inc(currentPos, maskLower, maskUpper);
        if (currentPos <= maskLower) {
          return false;
        }
      }

      int pin = node.getPosition(currentPos, dims);
      if (pin >= 0 && readValue(pin, currentPos, result)) {
        next = currentPos;
        return true;
      }
    } while (true);
  }