For longer journeys taking a local train to save a few minutes and catch the night-train on the next station is not optimal. But, increasing the transferCost will have an unwanted effect on shorter trips.
Observed behavior
By turning the debug filter on we see that the direct alternative is lost:

The direct "night-train" alternative have the highest cost du to leaving 10 minutes before the 2 local train alternatives.
Version of OTP used (exact commit hash or JAR name)
dev-2.x
Data sets in use (links to GTFS and OSM PBF files)
Entur
For longer journeys taking a local train to save a few minutes and catch the night-train on the next station is not optimal. But, increasing the transferCost will have an unwanted effect on shorter trips.
Observed behavior
By turning the debug filter on we see that the direct alternative is lost:
The direct "night-train" alternative have the highest cost du to leaving 10 minutes before the 2 local train alternatives.
Version of OTP used (exact commit hash or JAR name)
dev-2.xData sets in use (links to GTFS and OSM PBF files)
Entur