It's easier for the NFL because the "flex" part of it just comes in
which time of the day the game happens on Sunday, not which day it is. This is tougher to handle for the NBA because games are on almost every night of the week. Now it'd be nice if the NBA could switch the national TV game to a different game on the same night; I'd be totally in favor of that, like your example of switching from Miami-Chicago to Boston-Portland. Why they can't at least do that is a good question.