private static PathNode findTargetPath(AIUnit aiUnit, boolean deferOK) {
        if (invalidAIUnitReason(aiUnit) != null) return null;
        final Unit unit = aiUnit.getUnit();
        final Tile startTile = unit.getPathStartTile();
        if (startTile == null) return null;
        
        // Not on the map?  Europe *must* be viable, so go there
        // (return null for now, path still impossible).
        PathNode path;
        final Player player = unit.getOwner();
        final Europe europe = player.getEurope();
        final Unit carrier = unit.getCarrier();
        final CostDecider standardCd
            = CostDeciders.avoidSettlementsAndBlockingUnits();
        final CostDecider relaxedCd = CostDeciders.numberOfTiles();

        if (player.getNumberOfSettlements() <= 0) {
            // No settlements, so go straight to Europe.  If Europe does
            // not exist then this mission is doomed.  If a carrier is
            // present use it, otherwise relax the cost decider and at least
            // start working on a path.
            return (europe == null)
                ? null // Nowhere suitable at all!
                : (carrier != null)
                ? unit.findPath(startTile, europe, carrier, standardCd)
                : unit.findPath(startTile, europe, null, relaxedCd);
        }

        // Can the unit get to a cash in site?
        final GoalDecider gd = getGoalDecider(aiUnit, deferOK);
        path = unit.search(startTile, gd, standardCd, MAX_TURNS, carrier);
        if (path != null) return path;

        // One more try with a relaxed cost decider and no range limit.
        return unit.search(startTile, gd, relaxedCd, INFINITY, carrier);
    }